home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Reference / the cmsp digests ('94-'97) / csmp digest Vol 4 No 014 < prev    next >
Text File  |  1996-10-27  |  137KB  |  3,915 lines

  1. C.S.M.P. Digest             Mon, 21 Oct 96       Volume 4 : Issue 14
  2.  
  3. Today's Topics:
  4.  
  5.         Converting a string to OSType
  6.         Daylight saving time
  7.         Gamma fade - speed problem?
  8.         HTTP and HTML
  9.         Hilite mode with a background color
  10.         LaunchApplication() & the launchAppParameters field
  11.         Learning low-level debugging?
  12.         Mac GUI...how it works
  13.         Making OpenDoc Container Applications
  14.         ODF vs. PP-MacApp-TCL?
  15.         PowerBook examples?
  16.         Setting volume cache to write-through?
  17.         Source code for opening GIF's and JPEG's?
  18.         Symantec linker and unresolved symbols
  19.         TCP-IP apps automatically dialing PPP, etc.
  20.         THINK Reference
  21.         Think C, Symantec C
  22.         Think Pascal question
  23.         Traps.h & asm.h in Sym C-C++ 6
  24.         VIP-Basic: Opinions?
  25.         WANTED: Simple FAT DA...
  26.         WinSock.lib for macintosh
  27.         [Q] Internet Config help
  28.         text rotation
  29.  
  30.  
  31.  
  32. The Comp.Sys.Mac.Programmer Digest is moderated by Mark Aiken
  33. (marka@ee.mcgill.ca).
  34.  
  35. The digest is a collection of article threads from the internet
  36. newsgroups comp.sys.mac.programmer.help, csmp.tools, csmp.misc and
  37. csmp.games. It is designed for people who read news semi-regularly and
  38. want an archive of the discussions.  If you don't know what a
  39. newsgroup is, you probably don't have access to it. Ask your systems
  40. administrator(s) for details. If you don't have access to news, you
  41. may still be able to post messages to the group by using a mail server
  42. like anon.penet.fi (mail help@anon.penet.fi for more information).
  43.  
  44. Each issue of the digest contains one or more sets of articles (called
  45. threads), with each set corresponding to a 'discussion' of a particular
  46. subject.  The articles are not edited; all articles included in this digest
  47. are in their original posted form (as received by our news server at
  48. ee.mcgill.ca).  Article threads are not added to the digest until the last
  49. article added to the thread is at least two weeks old (this is to ensure that
  50. the thread is dead before adding it to the digest).  Article threads that
  51. consist of only one message are generally not included in the digest.
  52.  
  53. The digests can be obtained by email, ftp or through the World Wide Web.
  54.  
  55. If you want to receive the digest by mail, send email to 
  56. majordomo@ee.mcgill.ca with no subject and one of the following commands
  57. as body:
  58.  
  59.     help                        Sends you a summary of commands
  60.     subscribe csmp                      Adds you to the mailing list
  61.     unsubscribe csmp                    Removes you from the list
  62.  
  63. Once you have subscribed, you will automatically receive each new
  64. issue as it is created.
  65.  
  66. Back issues are available by ftp from Info-Mac mirror sites in the
  67. per/csmp subdirectory, e.g.
  68.  
  69.   ftp://sumex-aim.stanford.edu/info-mac/per/csmp/
  70.  
  71. The contents of all back issues can be searched by accessing the
  72. following URL, courtesy of Andrew Barry (ajbarry@ozemail.com.au):
  73.  
  74.     http://marvin.stattech.com.au/search.html
  75.  
  76. They can also be searched through the following URLs, thanks to
  77. Tim Tuck (Tim.Tuck@sensei.com.au):
  78.  
  79.     http://wais.sensei.com.au/searchform.html
  80.     wais://wais.sensei.com.au:210/csmp?
  81.  
  82. -------------------------------------------------------
  83.  
  84. From bflanner@netdreams.com (Bob)
  85. Subject: Converting a string to OSType
  86. Date: Thu, 03 Oct 1996 18:58:42 -0800
  87. Organization: Net.Dreams
  88.  
  89. The OSType constants that I've used have been declared as globals:
  90.  
  91. static OSType gGeneric = {'????'};
  92.  
  93. which can be used later in the code.
  94.  
  95. What I'd like to do is convert a char[5] variable to the OSType.
  96. TIA!
  97. - (Bob) bflanner@sonic.net
  98.  
  99. +++++++++++++++++++++++++++
  100.  
  101. From francois-regis.degott@imag.fr (Fr. Degott)
  102. Date: 4 Oct 1996 08:59:31 GMT
  103. Organization: LogiMath - LMC-IMAG - Grenoble
  104.  
  105. In article <bflanner-0310961858420001@d129.pm4.sonic.net>,
  106. bflanner@netdreams.com (Bob) wrote:
  107.  
  108. > The OSType constants that I've used have been declared as globals:
  109. > static OSType gGeneric = {'????'};
  110. > which can be used later in the code.
  111. > What I'd like to do is convert a char[5] variable to the OSType.
  112. > TIA!
  113. > - (Bob) bflanner@sonic.net
  114.  
  115. Hi Bob,
  116.  
  117. int i;
  118. char NewValue[5];
  119. for (i=0;i<4;i++) gGeneric[i]=NewValue[i];
  120.  
  121. HTH
  122. Fr.
  123. _____________________________________________________________________________
  124. Fr. Degott (Francois-Regis.Degott@imag.fr)
  125. LogiMath, Lab. LMC-IMAG - Grenoble - France
  126.  
  127. +++++++++++++++++++++++++++
  128.  
  129. From Chelly Green <chelly@eden.com>
  130. Date: Sun, 06 Oct 1996 15:00:01 -0500
  131. Organization: -
  132.  
  133. Richard E. Fiegle wrote:
  134. > In article <bflanner-0310961858420001@d129.pm4.sonic.net>,
  135. > bflanner@netdreams.com (Bob) wrote:
  136. > > The OSType constants that I've used have been declared as globals:
  137. > >
  138. > > static OSType gGeneric = {'????'};
  139. > >
  140. > > which can be used later in the code.
  141. > >
  142. > > What I'd like to do is convert a char[5] variable to the OSType.
  143. > > TIA!
  144. > Try something like this:
  145. > char* my_type_string[5] = {"TEXT"};
  146.  
  147. braces are unnecessary, and this creates an array of 5 char*, not
  148. exactly what you want either
  149.  
  150. Note: the following rant is directed at all unnecessary casts, not just
  151. yours - don't take it personally (since I'm not making any personal
  152. comments).
  153.  
  154. try this:
  155.  
  156.     static const char my_type_string [] = "TEXT";
  157.  
  158. const correctness is good, as well making constants static (less
  159. copying, more efficient)
  160.  
  161. > OSType type_converted_from_string = *(OSType*)my_type_string;
  162.  
  163. i.e. OSType t = *reinterpret_cast<OSType*> (my_type_string);
  164.  
  165. What is it with doing non-portable things? Besides that, this won't
  166. necessarily even work on all Macs, let alone other systems! Is
  167. efficiency more important than program correctness? "Hey, our program
  168. calculates the result instantly, only it is the wrong result!" Better to
  169. take longer than get a wrong answer.
  170.  
  171. > The key is that type cast:  *(OSType*).  This says: "convert the
  172. > char* to an OSType*, and then de-reference that OSType*, so it
  173. > becomes an OSType".
  174.  
  175. No, this says "trust me, Mr. Compiler, this char* really points to an
  176. OSType (which it does *NOT*), I know what I'm doing (which you don't
  177. seem to)". Type conversion and type reinterpretation are two very
  178. different things, which is why the old-style casts are so dangerous and
  179. confusing (they do both, depening on lots of factors).
  180.  
  181. Casts are way-overused.
  182.  
  183. > Works for me.
  184.  
  185. Doesn't work for me, and I don't even need to run the code. The "works
  186. for me" argument means nothing. Invoking undefined behavior may work
  187. sometimes, other times it may not. Any reliance on undefined behavior
  188. should be very seriously questioned, and alternatives should be
  189. considered.
  190.  
  191. Now, I'm not just going to rant about this, I'm going to show a correct
  192. version that is portable, and will work on other machines (including
  193. little-endian machines, like Intel).
  194.  
  195.     #include <assert.h>
  196.     #include <string.h>
  197.     
  198.     typedef long OSType; // a four-character code
  199.  
  200. // C version
  201.  
  202.     // converts a four-character length string into an OSType
  203.     // example: make_OSType_c( "1234" ) == '1234'
  204.     // returns 0 if the string is NULL or doesn't contain 4 characters
  205.     // assumes a char has 8 bits
  206.     OSType make_OSType_c( const char* string )
  207.     {
  208.         OSType t;
  209.         if ( !string || strlen( string ) != 4 )
  210.             return 0;
  211.         t =            (unsigned char) *string++;
  212.         t = (t << 8) | (unsigned char) *string++;
  213.         t = (t << 8) | (unsigned char) *string++;
  214.         t = (t << 8) | (unsigned char) *string++;
  215.         return t;
  216.     }
  217.  
  218. // C++ version (implemented on top of the C version - why duplicate
  219. code?)
  220.  
  221.     struct bad_argument { };
  222.     
  223.     // same as make_OSType_c, but throws a bad_argument exception
  224. instead
  225.     // of returning 0
  226.     OSType make_OSType( const char* string )
  227.     {
  228.         OSType t = make_OSType_c( string );
  229.         if ( !t ) throw bad_argument();
  230.         return t;
  231.     }
  232.  
  233. // test driver
  234.    
  235.     int main()
  236.     {
  237.         assert( make_OSType_c( "ABCD" ) == 'ABCD' );
  238.         assert( make_OSType_c( "\x80\x81\x82\x83" ) ==
  239. '\x80\x81\x82\x83' );
  240.         assert( make_OSType_c( "X" ) == 0 );
  241.         assert( make_OSType_c( "12345" ) == 0 );
  242.         try {
  243.             make_OSType( "123456" );
  244.             assert( 0 );
  245.         } catch ( bad_argument ) { }
  246.         catch ( ... ) { assert( 0 ); }
  247.         
  248.         return 0;
  249.     }
  250.  
  251. (note: code has been compiled and tested)
  252.  
  253. -- 
  254. Chelly Green | chelly@eden.com | C++ - http://www.eden.com/~chelly
  255.  
  256.  
  257. +++++++++++++++++++++++++++
  258.  
  259. From Chelly Green <chelly@eden.com>
  260. Date: Tue, 08 Oct 1996 14:39:51 -0500
  261. Organization: -
  262.  
  263. Richard E. Fiegle wrote:
  264. > In article <32580FC7.7D70@eden.com>, chelly@eden.com wrote:
  265. > > Richard E. Fiegle wrote:
  266. ...
  267. > > > Try something like this:
  268. > > >
  269. > > > char* my_type_string[5] = {"TEXT"};
  270. > >
  271. > > braces are unnecessary, and this creates an array of 5 char*, not
  272. > > exactly what you want either
  273. > Oops!  You got me on the array of char*.  That was a typo.  Should
  274. > have been
  275. >   char my_type_string[5] = {"TEXT"};
  276. > I use this construct all the time.  Not sure how that one got by me.
  277. > Also, personally, for any array, I use brackets.  This helps to remind
  278. > me that it's an array.  YMMV.
  279.  
  280. Me too, the brackets [] tell me it's an array. Why the redundant braces
  281. { } ?
  282.  
  283. > > [SNIP - arguments for const, reinterpret_cast]
  284. > >
  285. > > Casts are way-overused.
  286. > >
  287. > > > Works for me.
  288. > >
  289. > > Doesn't work for me, and I don't even need to run the code
  290. > I assume you say this because of the typo (i.e., char* array instead
  291. > of char array)?  I use this (corrected version) all the time, and I'll
  292. > repeat:  It works for me, from my old Mac Plus to my new 7500/100.
  293.  
  294. Alignment requirements. A long may have a stricter alignment requirement
  295. than a char. The char array may be unaligned, therefore casting a
  296. pointer to this array to a pointer a long, and dereferencing this,
  297. yields implementation-defined behavior (OK, so it's not undefined, it's
  298. an "implementation-dependent restriction on the value of a pointer to an
  299. object of a given type". Hmmm, if the pointer doesn't follow this
  300. restriction, I wonder if it's undefined or implementation-defined?) The
  301. char array *is-not-a* long!
  302.  
  303. > > The "works
  304. > > for me" argument means nothing. Invoking undefined behavior may work
  305. > > sometimes, other times it may not. Any reliance on undefined behavior
  306. > > should be very seriously questioned, and alternatives should be
  307. > > considered.
  308. > Why is this undefinded behavior?
  309.  
  310. See above.
  311.  
  312. > An OSType is 4 sequential bytes (like a long).  Character strings are
  313. > sequential bytes as well.  I fail to see what is undefined.
  314.  
  315. Alignment. Again, see above (I know, I know, you couldn't have already
  316. read my reply to your reply!  :-)
  317.  
  318. +++++++++++++++++++++++++++
  319.  
  320. From Chelly Green <chelly@eden.com>
  321. Date: Tue, 08 Oct 1996 14:39:51 -0500
  322. Organization: -
  323.  
  324. Richard E. Fiegle wrote:
  325. > In article <32580FC7.7D70@eden.com>, chelly@eden.com wrote:
  326. > > Richard E. Fiegle wrote:
  327. ...
  328. > > > Try something like this:
  329. > > >
  330. > > > char* my_type_string[5] = {"TEXT"};
  331. > >
  332. > > braces are unnecessary, and this creates an array of 5 char*, not
  333. > > exactly what you want either
  334. > Oops!  You got me on the array of char*.  That was a typo.  Should
  335. > have been
  336. >   char my_type_string[5] = {"TEXT"};
  337. > I use this construct all the time.  Not sure how that one got by me.
  338. > Also, personally, for any array, I use brackets.  This helps to remind
  339. > me that it's an array.  YMMV.
  340.  
  341. Me too, the brackets [] tell me it's an array. Why the redundant braces
  342. { } ?
  343.  
  344. > > [SNIP - arguments for const, reinterpret_cast]
  345. > >
  346. > > Casts are way-overused.
  347. > >
  348. > > > Works for me.
  349. > >
  350. > > Doesn't work for me, and I don't even need to run the code
  351. > I assume you say this because of the typo (i.e., char* array instead
  352. > of char array)?  I use this (corrected version) all the time, and I'll
  353. > repeat:  It works for me, from my old Mac Plus to my new 7500/100.
  354.  
  355. Alignment requirements. A long may have a stricter alignment requirement
  356. than a char. The char array may be unaligned, therefore casting a
  357. pointer to this array to a pointer a long, and dereferencing this,
  358. yields implementation-defined behavior (OK, so it's not undefined, it's
  359. an "implementation-dependent restriction on the value of a pointer to an
  360. object of a given type". Hmmm, if the pointer doesn't follow this
  361. restriction, I wonder if it's undefined or implementation-defined?) The
  362. char array *is-not-a* long!
  363.  
  364. > > The "works
  365. > > for me" argument means nothing. Invoking undefined behavior may work
  366. > > sometimes, other times it may not. Any reliance on undefined behavior
  367. > > should be very seriously questioned, and alternatives should be
  368. > > considered.
  369. > Why is this undefinded behavior?
  370.  
  371. See above.
  372.  
  373. > An OSType is 4 sequential bytes (like a long).  Character strings are
  374. > sequential bytes as well.  I fail to see what is undefined.
  375.  
  376. Alignment. Again, see above (I know, I know, you couldn't have already
  377. read my reply to your reply!  :-)
  378.  
  379. > Are you arguing that all type casts result in undefined behavior?
  380.  
  381. Many casts invoke implementation-defined behavior, yes.
  382.  
  383. > > [SNIP - other eloquent aguments about the evils of type-casting]
  384. > >
  385. > >     #include <assert.h>
  386. > >     #include <string.h>
  387. > >
  388. > >     typedef long OSType; // a four-character code
  389. > >
  390. > > // C version
  391. > >
  392. > >     // converts a four-character length string into an OSType
  393. > >     // example: make_OSType_c( "1234" ) == '1234'
  394. > >     // returns 0 if the string is NULL or doesn't contain 4 characters
  395. > >     // assumes a char has 8 bits
  396. > >     OSType make_OSType_c( const char* string )
  397. > >     {
  398. > >         OSType t;
  399. > >         if ( !string || strlen( string ) != 4 )
  400. > >             return 0;
  401. > >         t =            (unsigned char) *string++;
  402. > >         t = (t << 8) | (unsigned char) *string++;
  403. > >         t = (t << 8) | (unsigned char) *string++;
  404. > >         t = (t << 8) | (unsigned char) *string++;
  405. > >         return t;
  406. > >     }
  407. > >
  408. > > [SNIP - C++ and driver code]
  409. > >
  410. > > (note: code has been compiled and tested)
  411. > Your arguments are all valid and well-articulated.  I just have a
  412. > few counterpoints:
  413. > (0)  *string++ will break on 68000 machines (like my Mac Plus), which
  414. >      cannot access odd-memory addresses.  When string gets to an odd
  415. >      address, you'll crash hard.
  416.  
  417. So you're saying something as simple as this will break:
  418.  
  419.     int strlen( const char* str )
  420.     {
  421.         const char* p = str;
  422.         while ( *p++ ) { }
  423.         return p - str - 1;
  424.     }
  425.  
  426. Wow! That's a new one for me (I'm being sarcastic). This will not break.
  427. It is portable code. Did you run the code on your Mac Plus? Did it
  428. really crash?
  429.  
  430. > (1)  "Don't use Type Casting" is a "rule", much like "Don't use Gotos"
  431. >      is a rule.
  432.  
  433. Nono, it's not a rule to me (I am also against the stupid "never use
  434. goto" thing too). I use typecasts. It's just that I do see too many
  435. typecasts, so I always try to find alternatives.
  436.  
  437. >      These are great rules, but some rules should be
  438. >      broken _when it makes sense_.
  439.  
  440. Well, rules shouldn't be made if they have to be broken regularly :-)
  441.  
  442. >      I forget exactly who said: "A
  443. >      foolish consistency is the hobgoblin of little minds", but to
  444. >      me, this means rules are guidelines, and no substitute for thinking.
  445. >      I might break a rule because of performance, maintainability,
  446. >      resource requirements, overhead, difficulty, or readability issues.
  447. >      YMMV.
  448.  
  449. I agree.
  450.  
  451. >      Seems to me the perspective on "rules" is:  If one is a "SW engineer",
  452. >      or in academia with little "real world" experience, he is likely
  453. >      to be a stickler for rules.  If, however, one is a "programmer",
  454. >      "hacker", or a real-world problem solver (engineer?) with real time
  455. >      constraints, one tends to be a little more lenient, especially if
  456. >      following the rule means delivering a product late, or doing a
  457. >      significant amount of extra work to implement it, when a viable
  458. >      alternative is readily available.
  459.  
  460. Agreed. In a recent goto thread, someone had posted a deeply nested loop
  461. (another thing to stay away from) with multiple tests on an exit
  462. variable, where the goto didn't have that extra junk. The goto version
  463. was clearer, but some still were against it simply because it involved
  464. goto. Hehe
  465.  
  466. >      Back to type casting: if you have an alias in a resource file, you
  467. >      use GetResource() to obtain a handle to it.  GetResource() returns
  468. >      a Handle.  Now suppose you want to resolve the alias.  ResolveAlias()
  469. >      takes an AliasHandle.  What's the right thing to do here?
  470.  
  471. A type cast. This involves non-static type checking, so the compiler
  472. cannot know the type at run-time. You have to help it. However, if you
  473. do some type checking, such as insuring a tag field in the data matches
  474. that for an Alias, then you get run-time type checking. This can be
  475. templatized to make it more regular, and move the casts out of the user
  476. code to where they can be verified with the tag field.
  477.  
  478. >      Somewhere here, you're going to have a type cast to an AliasHandle,
  479. >      either of the two following are candidate solutions in my book:
  480. ...
  481. >      Perhaps your answer will be to use reinterpret_cast<>.
  482.  
  483. That's what you used. Old-style casts are now defined in terms of the
  484. new-style casts. In this case, '(AliasHandle) Handle' turns into
  485. 'reinterpret_cast<AliasHandle> (Handle)'.
  486.  
  487. >      Perhaps this is a good answer.  But, what if the programmer is
  488. >      using C, not C++?  Is reinterpret_cast<> part of the C standard?
  489.  
  490. Yes (sort of), but you have no way of explicitly specifying it in the
  491. language. An old-style cast, (T) x, will specify that in this case. Or
  492. you could use a macro:
  493.  
  494.     #ifdef __cplusplus
  495.         #define reinterpret_cast( T, v ) (reinterpret_cast<T> (v))
  496.     #else
  497.         #define reinterpret_cast( T, v ) ((T) (v))
  498.     #endif
  499.  
  500. (yes, this will work in C++, and won't conflict with reinterpret_cast<>,
  501. because the macro is only invoked when there is an open parenthesis
  502. after the name)
  503.  
  504. >      What if the programmer is a poor student, and only has Think C
  505. >      version 5? (which I'm pretty sure does not support new casting,
  506. >      even if C itself does)
  507.  
  508. Hmmm, maybe C will support the new cast operators in the future...
  509.  
  510. > (2)  Using a type cast takes one line of code.  Your solution, although
  511. >      very robust to errors, very portable and apparently very well tested,
  512.  
  513. Not really tested much, I wrote it just for the reply.
  514.  
  515. >      takes 8 lines of code (I didn't count your main() driver, or your C++
  516. >      version).  IMHO, it's more difficult to read, too, especially the
  517. >      lines that contain the following:
  518.  
  519. Users using the function or the implementation? I think the comment
  520. specified what the function did. If you want to verify the
  521. implementation, then run the test program. If you really want to verify
  522. it, then you'll have to read the sourclems along the way.
  523.  
  524. >      Of course, there are drawbacks to this:
  525. >      Ever notice how many bugs there are in "new" software?  Well,
  526. >      The Correct Solution and the Timing Requirements are at odds with
  527. >      each other, so we make compromises.  We're doing the best we can
  528. >      with what we've got.
  529.  
  530. But you need to always be learning *better* ways of doing things, using
  531. your tools more effectively, taking risks, experimenting with ideas.
  532.  
  533. >      [This is not to say there is no room for
  534. >      improvement -- but look at No Silver Bullet where Fred  Brooks says
  535. >      that we've already made 85% of all optimizations in software
  536. >      development.  There will be no "order-of-magnitude" improvements].
  537.  
  538. Sure, as a *whole*, there may be no more major optimizations (yeah,
  539. right), but what *individual* has learned all the things the whole has
  540. learned? Each individual knows a small portion of these techniques.
  541.  
  542. Never stop learning!
  543.  
  544. > --
  545. > Richard E. Fiegle
  546. > Opinions expressed are mine, not necessarily those of my employer
  547.  
  548. Oh great, I'm now participating in one of this big discussion threads...
  549. :-)
  550. -- 
  551. Chelly Green | chelly@eden.com | C++ - http://www.eden.com/~chelly
  552. e code.
  553.  
  554. (Also, I should have used CHAR_BIT from <limits.h>, so it wouldn't even
  555. assume 8-bit chars)
  556.  
  557. >      (t << 8) | (unsigned char) *string++;
  558. >      It also uses more stack space, has more overhead, blah, blah, blah.
  559. >      I'm sure you knew that  :-)
  560.  
  561. Hell yeah, but I'd rather have a robust program than one that crashes on
  562. machines that can't handle unaligned long-word accesses (such as the
  563. 68000). I admit, I usually only put lots of error checking and
  564. assertions in error-prone areas, such as memory copy, and memory
  565. management.
  566.  
  567. Who says it couldn't have had a more efficient implementation?
  568.  
  569.     OSType func( const char* str )
  570.     {
  571.         // checking
  572. #if unaligned_access_ok && big_endian_cpu
  573. // or even   if ( big_endian_cpu && (unaligned_access_ok ||
  574. is_ptr_aligned( str )) )
  575.         return *reinterpret_cast<const OSType*> (str);
  576. #else
  577.         // ...
  578. #endif
  579.     }
  580.  
  581. >      I can see what it does, but to a novice (for readability), the
  582. >      type-cast gets the point across very clearly (yeah, I know, it
  583. >      also starts what may turn out to be a "bad habit").
  584.  
  585. But the type-cast doesn't work on all Macs, and won't work right on
  586. Intel machines (which use little-endian byte ordering). Why should a
  587. novice know about memory layout without knowing about the dangers (and
  588. the fact that different processors may be significantly different)?
  589.  
  590. > (3)  It's been my experience that many (not all -- sorry for the
  591. >      stereotype) programmers are under time constraints, and are
  592. >      many times more interested in a quick-and-easy solution that
  593. >      *works*, not in The "Correct Solution"
  594.  
  595. Yes, I get that impression too. But in this case, your code would have
  596. failed on a machine that didn't allow unaligned accesses, as well as
  597. non-big-endian machines. I bet you could even try it on your Mac Plus
  598. and get it to crash.
  599.  
  600. ...
  601. >      Back in the real-world though, it has become obvious that time
  602. >      (delivery of product time, that is) is of the essence.  In all
  603. >      practicality, the quicker you get a solution, the better your
  604. >      company is financially.
  605.  
  606. The quicker you get the *stable* solution, the more flexible it is, how
  607. well it helps catch errors. I think spending time before coding is
  608. better than just coding and fixing problems along the way.
  609.  
  610. >      Of course, there are drawbacks to this:
  611. >      Ever notice how many bugs there are in "new" software?  Well,
  612. >      The Correct Solution and the Timing Requirements are at odds with
  613. >      each other, so we make compromises.  We're doing the best we can
  614. >      with what we've got.
  615.  
  616. But you need to always be learning *better* ways of doing things, using
  617. your tools more effectively, taking risks, experimenting with ideas.
  618.  
  619. >      [This is not to say there is no room for
  620. >      improvement -- but look at No Silver Bullet where Fred  Brooks says
  621. >      that we've already made 85% of all optimizations in software
  622. >      development.  There will be no "order-of-magnitude" improvements].
  623.  
  624. Sure, as a *whole*, there may be no more major optimizations (yeah,
  625. right), but what *individual* has learned all the things the whole has
  626. learned? Each individual knows a small portion of these techniques.
  627.  
  628. Never stop learning!
  629.  
  630. > --
  631. > Richard E. Fiegle
  632. > Opinions expressed are mine, not necessarily those of my employer
  633.  
  634. Oh great, I'm now participating in one of this big discussion threads...
  635. :-)
  636. -- 
  637. Chelly Green | chelly@eden.com | C++ - http://www.eden.com/~chelly
  638.  
  639. +++++++++++++++++++++++++++
  640.  
  641. From Chelly Green <chelly@eden.com>
  642. Date: Tue, 08 Oct 1996 14:56:10 -0500
  643. Organization: -
  644.  
  645. John Stiles wrote:
  646. > > Your arguments are all valid and well-articulated.  I just have a
  647. > > few counterpoints:
  648. > >
  649. > > (0)  *string++ will break on 68000 machines (like my Mac Plus), which
  650. > >      cannot access odd-memory addresses.  When string gets to an odd
  651. > >      address, you'll crash hard.
  652. > Not true in this case. He's getting a char, which is only one byte.
  653.  
  654. Or you'd expect it to be a byte, and sizeof (char) is defined to be 1.
  655. So I guess it's a byte (OK, so I know it is, but I wanna be a
  656. language-freak right now  :-)
  657.  
  658. > 68000's can access odd-memory bytes, but not words or longs. I've had a
  659. > lot of experience on this one (I wrote a BinHexer in assembly a few years
  660. > ago).
  661.  
  662. I don't need to know this (even though I do), because we're talking
  663. about the C language, not assembly language or logic hardware.
  664.  
  665. > The rest of your post, though, was incredibly well articulated. Bravo! I
  666. > honestly can't believe someone would go so far as to implement a complex
  667. > C++ program to convert a 4-character string to a longword.
  668.  
  669. OK, so maybe I went a little too far (but it works, does it matter?). I
  670. wanted to make a point, damn it!  :-)
  671.  
  672. > Portability
  673. > reasons...?!?! When was OSType a valid type in Windows?
  674.  
  675.     typedef long OSType;
  676.  
  677. Valid now? Using character codes is common on many systems.
  678.  
  679. > UNIX? C'mon guys, this is an EASY problem...
  680.  
  681. An easy one to screw up, I see (yes, you are about to post an incorrect
  682. solution, not due to any typos)
  683.  
  684. > {
  685. >    OSType myOSType;
  686. >    char myStringType[5] = "TEXT";
  687. >    myOSType = *(long*)myStringType;
  688. > }
  689. > This might fail on a 68000 series,
  690.  
  691. This will fail, no question (but not necessarily every time it's
  692. called). Of course, the myStringType wouldn't be locally initialized,
  693. otherwise why even use any casting?  i.e.  'TEXT'   ding!
  694.  
  695. > FWIW, because this WOULD screw up the
  696. > 68000's alignment on odd addresses (we're using a long this time, not
  697. > bytes). If you really want to support 68000 machines,
  698.  
  699. Or any other machine that can't handle unaligned accesses (I hear many
  700. RISC machines are like that).
  701.  
  702. > you could use the safe method:
  703. > {
  704. >    OSType myOSType;
  705. >    char myStringType[5] = "TEXT";
  706. >    myOSType = (myStringType[0] << 24) | (myStringType[1] << 16) |
  707. >               (myStringType[2] << 8)  | (myStringType[3]      );
  708. > }
  709. > None of this code was tested.
  710.  
  711. Because if it were, it would be found not to work (for two reasons)!
  712. Yes, that's right. Try it on a compiler that uses 16-bit ints (like the
  713. Mac 68K compilers can do).
  714.  
  715. Reason 1:
  716.  
  717.    myStringType[0] << 24
  718.  
  719. Compiler promotes char to int, which could be as small as 16 bits. Shift
  720. left 24 bits, and you always have zero!
  721.  
  722. Reason 2:
  723.  
  724.     myStringType[3]
  725.  
  726. char may be signed or unsigned. On Mac compilers, it is often signed. If
  727. one of the chars of the type had were negative (i.e. its value was >
  728. 127, sign bit set, say a special extended character), then conversion to
  729. int (sign-extension) would cause it to mess with other characters.
  730.  
  731. > But it's so basic! If there's a bug, it's probably a typo rather than a logic error.
  732.  
  733. I don't think either of those were typos. They were a result of not
  734. examining the code carefully, not understanding the standard well
  735. enough, or both. Nice try, though. That probably would have been a
  736. better way to write the routine I posted (instead of using
  737. post-incrementing on the pointer).
  738.  
  739. > Oh, and for the record, the routine directly above is 100% portable, with
  740. > no endian reliance. But who the heck cares?!? ;) ;)
  741.  
  742. I sure don't, since it is broken anyway. Hey, I can write a 100%
  743. portable routine (like yours) with even less code!
  744.  
  745.     OSType type_from_string( const char* ) { return -1; }
  746.  
  747. Works just about as well :-)
  748.  
  749. > *Stiles
  750.  
  751. -- 
  752. Chelly Green | chelly@eden.com | C++ - http://www.eden.com/~chelly
  753.  
  754. ---------------------------
  755.  
  756. From t.grimwood@auckland.ac.nz (Tony Grimwood)
  757. Subject: Daylight saving time
  758. Date: Tue, 08 Oct 1996 10:33:32 +1300
  759. Organization: School of Music, University of Auckland
  760.  
  761. Can anyone tell me if where the OS stores it's daylight saving time flag
  762. and how to access it?
  763. thanks
  764.  
  765. tg
  766.  
  767. -- 
  768. PGP fingerprint: 8D 40 36 1C 60 51 DE 2F  DA E0 A1 10 86 0D 0A E5
  769.  
  770.      Make no friendship with an elephant keeper
  771.      unless you have room to entertain an elephant.
  772.                             - Saadi of Shiraz -
  773.  
  774. +++++++++++++++++++++++++++
  775.  
  776. From blob@ricochet.net
  777. Date: Mon, 07 Oct 1996 20:44:09 -0700
  778. Organization: (none)
  779.  
  780. In article <t.grimwood-0810961033320001@news.auckland.ac.nz>,
  781. t.grimwood@auckland.ac.nz (Tony Grimwood) wrote:
  782.  
  783. > Can anyone tell me if where the OS stores it's daylight saving time flag
  784. > and how to access it?
  785.  
  786. This is documented in technote 1064, with the too-long title of "Inside
  787. Macintosh: Operating System Utilities:Addendum to Chapter 4 -- Determining
  788. If Daylight Savings Time is in Effect".  This is available at the URL
  789. <http://devworld.apple.com/dev/technotes/tn/tn1064.html>
  790.  
  791. -- 
  792. (Pointers to other Mac programming web sites at
  793. <http://devworld.apple.com/dev/geeks.html>)
  794.  
  795. +++++++++++++++++++++++++++
  796.  
  797. From Lev_Knopov@mail.stil.scitex.com (Lev Knopov)
  798. Date: Tue, 08 Oct 1996 08:51:50 +0200
  799. Organization: Scitex Corporation Ltd.
  800.  
  801. In article <t.grimwood-0810961033320001@news.auckland.ac.nz>,
  802. t.grimwood@auckland.ac.nz (Tony Grimwood) wrote:
  803.  
  804. > Can anyone tell me if where the OS stores it's daylight saving time flag
  805. > and how to access it?
  806. > thanks
  807. > tg
  808.  
  809. Check pascal void ReadLocation(MachineLocation *loc) (OSUtils.h)
  810.  
  811. For more info go to 
  812.  page 4-20 of Inside Macintosh: Operating System Utilities
  813.  
  814. HTH
  815.  
  816. -- 
  817.   //\\   Lev Knopov
  818.   \\//   Scitex Israel
  819. ///  \\\ Lev_Knopov@mail.stil.scitex.com
  820.  
  821.  
  822. ---------------------------
  823.  
  824. From Ulla S=?iso-8859-1?Q?=F6derberg Lundgren <ulla_s_l@tf.macexchange.se>?=
  825. Subject: Gamma fade - speed problem?
  826. Date: Thu, 03 Oct 1996 16:32:36 +0000
  827. Organization: NAVOCEANO
  828.  
  829. The game I'm wrigting right now, is supposed to start with a gamma 
  830. fade when you open it. I found a nice library that takes care of it 
  831. for me. There's just one problem; It slows all the CopyBits calls from 
  832. my QWorld to the screen down increadibly! I'm pretty sure it has to do 
  833. with the palette. It seems like CopyBits is translating the colors for 
  834. me even though they are the same. Is there a simple way of fixing 
  835. this?
  836.  
  837.    /Patrik
  838.  
  839. +++++++++++++++++++++++++++
  840.  
  841. From zaphod@dna.ca (Zaphod)
  842. Date: Sun, 6 Oct 1996 10:36:57 -0400
  843. Organization: dna.ca
  844.  
  845. ulla s l@tf.macexchange.se,Internet writes:
  846. >The game I'm wrigting right now, is supposed to start with a gamma 
  847. >fade when you open it. I found a nice library that takes care of it 
  848. >for me. There's just one problem; It slows all the CopyBits calls from 
  849. >my QWorld to the screen down increadibly! I'm pretty sure it has to do 
  850. >with the palette. It seems like CopyBits is translating the colors for 
  851. >me even though they are the same. Is there a simple way of fixing 
  852. >this?
  853.  
  854. It sounds like you are copying between two GWorlds that are each
  855. attached to a different device.
  856. When you make your gamma fade, the colours on one device change but not
  857. the other.  Copybits is likely trying to compensate for the colour
  858. difference which is probably where your slowdown is occuring.
  859.  
  860. There are two ways I would fix this : 
  861. 1) Make both GWorlds share the same graphics device.
  862. 2) Excute the gamma fade on both devices.
  863.  
  864. I'm not sure how effective the second one would be.  QuickDraw may
  865. still do the same thing.  Making both GWorlds share the same device is
  866. probably your best bet.
  867.  
  868. - ---------------------------------------------------------------
  869. - Brian Cantin, a.k.a. Zaphod    (zaphod@dna.ca)                -
  870. - Co-owner of Euphoria Cyberware (cp820@freenet.carleton.ca)    -
  871. - Computer Programming : The leading cause of caffine addiction -
  872. - ---------------------------------------------------------------
  873.  
  874. ---------------------------
  875.  
  876. From hpe@algonet.se
  877. Subject: HTTP and HTML
  878. Date: Tue, 08 Oct 1996 13:42:50 +0100
  879. Organization: AlgoNet Public Access Node, Stockholm
  880.  
  881. We are going to implement in our MacApp-application a communication between
  882. our application and WEB-servers on the Internet. It should be possible to fetch 
  883. and display HTML-files. It's not going to be a browser. We would only like
  884. to fetch
  885. and display pages as a complement to a local database.
  886.  
  887. Can someone help me with any of these questions:
  888.  
  889. 1. Can I find a third part library that implements TCP/IP and HTTP?
  890. 2  Can I find  some source code examples about this?
  891. 3. What API should I use? Open Transport?
  892. 4. Can I find a third part library or source code example that implements
  893. a simple HTML-viewer?
  894. 5. Can I find any useful information on the Developer CD Series?
  895.  
  896. Answer to this newsgroup or e-mail to petere@optosof.se
  897.  
  898.  
  899. Peter Eriksson
  900.  
  901. +++++++++++++++++++++++++++
  902.  
  903. From hpe@algonet.se (Peter Eriksson)
  904. Date: Wed, 09 Oct 1996 07:31:01 +0100
  905. Organization: AlgoNet Public Access Node, Stockholm
  906.  
  907. > Use PowerPlant's Internet Classes. Even though your project is written
  908. > with MacApp, you can still use these classes (we use parts of PowerPlant
  909. > in one of our MacApp-based applications). They only require the PowerPlant
  910. > Networking and Thread classes so you won't need the rest of PowerPlant.
  911.  
  912. Thank you,
  913.  
  914. I should test this today.
  915.  
  916. /Peter
  917.  
  918. +++++++++++++++++++++++++++
  919.  
  920. From hpe@algonet.se (Peter Eriksson)
  921. Date: Wed, 09 Oct 1996 07:31:36 +0100
  922. Organization: AlgoNet Public Access Node, Stockholm
  923.  
  924. > Use PowerPlant's Internet Classes. Even though your project is written
  925. > with MacApp, you can still use these classes (we use parts of PowerPlant
  926. > in one of our MacApp-based applications). They only require the PowerPlant
  927. > Networking and Thread classes so you won't need the rest of PowerPlant.
  928.  
  929. Thank you,
  930.  
  931. I should test this today.
  932.  
  933. /Peter
  934.  
  935. +++++++++++++++++++++++++++
  936.  
  937. From tulip@tiac.net (Ed Anson)
  938. Date: Tue, 08 Oct 1996 21:26:13 -0400
  939. Organization: Tulip Software
  940.  
  941. The answer to all those questions is Cyberdog. Check it out.
  942.  
  943.  
  944.  
  945. In article <hpe-0810961342090001@10.0.2.15>, hpe@algonet.se wrote:
  946.  
  947. > We are going to implement in our MacApp-application a communication between
  948. > our application and WEB-servers on the Internet. It should be possible
  949. to fetch 
  950. > and display HTML-files. It's not going to be a browser. We would only like
  951. > to fetch
  952. > and display pages as a complement to a local database.
  953. > Can someone help me with any of these questions:
  954. > 1. Can I find a third part library that implements TCP/IP and HTTP?
  955. > 2  Can I find  some source code examples about this?
  956. > 3. What API should I use? Open Transport?
  957. > 4. Can I find a third part library or source code example that implements
  958. > a simple HTML-viewer?
  959. > 5. Can I find any useful information on the Developer CD Series?
  960. > Answer to this newsgroup or e-mail to petere@optosof.se
  961. > Peter Eriksson
  962.  
  963. - --------------------
  964. Ed Anson
  965. Tulip Software
  966. Andover, MA 01810
  967. U.S.A.              <http://www.tiac.net/users/tulip/home.html>
  968.  
  969. +++++++++++++++++++++++++++
  970.  
  971. From mxmora@mxmdesigns.com (Matthew Xavier Mora)
  972. Date: Tue, 08 Oct 1996 23:12:24 -0700
  973. Organization: MXM DesignsÅ
  974.  
  975. In article <hpe-0810961348530001@10.0.2.15>, hpe@algonet.se wrote:
  976.  
  977. > We are going to implement in our MacApp-application a communication between
  978. > our application and WEB-servers on the Internet. It should be possible
  979. to fetch 
  980. > and display HTML-files. It's not going to be a browser. We would only like
  981. > to fetch
  982. > and display pages as a complement to a local database.
  983. > Can someone help me with any of these questions:
  984. > 1. Can I find a third part library that implements TCP/IP and HTTP?
  985. > 2  Can I find  some source code examples about this?
  986. > 3. What API should I use? Open Transport?
  987. > 4. Can I find a third part library or source code example that implements
  988. > a simple HTML-viewer?
  989. > 5. Can I find any useful information on the Developer CD Series?
  990. > Answer to this newsgroup or e-mail to petere@optosof.se
  991.  
  992. I have sample code  based on Peter Lewis's earlier TCP library
  993. code (ie pre Open Transport). It in Pascal.
  994.  
  995. Send me a reminder email and I'll send it to you if you want.
  996.  
  997. Xavier
  998.  
  999. -- 
  1000. Matthew Xavier Mora                    <mailto:mxmora@mxmdesigns.com>
  1001.                                <http://www.best.com/~mxmora/mxm.html>
  1002.  
  1003.  
  1004. +++++++++++++++++++++++++++
  1005.  
  1006. From SouthSide@kagi.com (Bob Bradley)
  1007. Date: Tue, 08 Oct 1996 18:36:55 -0800
  1008. Organization: SPC
  1009.  
  1010. In article <hpe-0810961342090001@10.0.2.15>, hpe@algonet.se wrote:
  1011.  
  1012. > 1. Can I find a third part library that implements TCP/IP and HTTP?
  1013.  
  1014. Use PowerPlant's Internet Classes. Even though your project is written
  1015. with MacApp, you can still use these classes (we use parts of PowerPlant
  1016. in one of our MacApp-based applications). They only require the PowerPlant
  1017. Networking and Thread classes so you won't need the rest of PowerPlant.
  1018.  
  1019. > 2  Can I find  some source code examples about this?
  1020.  
  1021. On the CodeWarrior CD, there's an Internet Example that implements HTTP as
  1022. well as SMTP, POP3, and FTP. It won't take you more than 30 minutes to get
  1023. it working.
  1024.  
  1025. > 3. What API should I use? Open Transport?
  1026.  
  1027. This is completely handled for you and it works with Open Transport and MacTCP.
  1028.  
  1029. ---------------------------
  1030.  
  1031. From smfr@santafe.edu (Simon Fraser)
  1032. Subject: Hilite mode with a background color
  1033. Date: Mon, 07 Oct 1996 19:26:07 -0700
  1034. Organization: Santa Fe Institute
  1035.  
  1036.  
  1037. What is the best way to hilite text, when it's drawn over a background
  1038. color that is not white?
  1039.  
  1040. If I do the standard thing of LMSetHiliteMode, then InvertRect, stuff
  1041. with a white background is hilited fine, but the hilite color does
  1042. not show up over a non-white background. Yet some apps (e.g. CW IDE 10)
  1043. do this fine.
  1044.  
  1045. Any help much appreciated,
  1046.  
  1047. Simon
  1048.  
  1049. -- 
  1050. ________________________________________________________________
  1051. Simon Fraser                                  Santa Fe Institute
  1052. smfr@santafe.edu                             1399 Hyde Park Road
  1053. http://www.santafe.edu/~smfr/                 Santa Fe, NM 87501
  1054.  
  1055. +++++++++++++++++++++++++++
  1056.  
  1057. From christian.bau@isltd.insignia.com (Christian Bau)
  1058. Date: Tue, 8 Oct 1996 14:48:46 GMT
  1059. Organization: Insignia Solutions
  1060.  
  1061. Hiliting exchanges the background color and the hilite color. So if you
  1062. have text drawn on light grey, for example, you must set the background
  1063. color to the light grey. 
  1064.  
  1065.  
  1066. In article <smfr-0710961926070001@simon.santafe.edu>, smfr@santafe.edu
  1067. (Simon Fraser) wrote:
  1068.  
  1069. > What is the best way to hilite text, when it's drawn over a background
  1070. > color that is not white?
  1071. > If I do the standard thing of LMSetHiliteMode, then InvertRect, stuff
  1072. > with a white background is hilited fine, but the hilite color does
  1073. > not show up over a non-white background. Yet some apps (e.g. CW IDE 10)
  1074. > do this fine.
  1075. > Any help much appreciated,
  1076. > Simon
  1077. > -- 
  1078. > ________________________________________________________________
  1079. > Simon Fraser                                  Santa Fe Institute
  1080. > smfr@santafe.edu                             1399 Hyde Park Road
  1081. > http://www.santafe.edu/~smfr/                 Santa Fe, NM 87501
  1082.  
  1083. +++++++++++++++++++++++++++
  1084.  
  1085. From parichan@best.com (Kevin Parichan)
  1086. Date: Tue, 08 Oct 1996 11:00:44 -0800
  1087. Organization: Best Internet Communications
  1088.  
  1089. In article <smfr-0710961926070001@simon.santafe.edu>, smfr@santafe.edu
  1090. (Simon Fraser) wrote:
  1091.  
  1092. >What is the best way to hilite text, when it's drawn over a background
  1093. >color that is not white?
  1094. >
  1095. >If I do the standard thing of LMSetHiliteMode, then InvertRect, stuff
  1096. >with a white background is hilited fine, but the hilite color does
  1097. >not show up over a non-white background. Yet some apps (e.g. CW IDE 10)
  1098. >do this fine.
  1099.  
  1100. Try temporarily setting the background color using RGBBackColor() to that
  1101. non-white color before calling LMSetHiliteMode and InvertRect. This should
  1102. work as long as the rectangle you're inverting covers only that single
  1103. color.
  1104.  
  1105. -Kevin Parichan
  1106.  
  1107.  
  1108. ---------------------------
  1109.  
  1110. From "John Haggerty" <johnh@imtcorp.com>
  1111. Subject: LaunchApplication() & the launchAppParameters field
  1112. Date: 3 Oct 1996 23:07:16 GMT
  1113. Organization: IMT
  1114.  
  1115. What is the appropriate contents of the launchAppParameters field if I want
  1116. to launch an app and have it immediately open a document. After reading the
  1117. LaunchApplication() and Apple Event documentation, it is still not clear to
  1118. me exactly what data the various fields of the record want.
  1119.  
  1120. Thanks,
  1121.  
  1122. John Haggerty
  1123. johnh@imtcorp.com
  1124.  
  1125. +++++++++++++++++++++++++++
  1126.  
  1127. From blob@ricochet.net
  1128. Date: Fri, 04 Oct 1996 19:10:20 -0700
  1129. Organization: (none)
  1130.  
  1131. In article <01bbb17e$dc525700$14646496@INX-10293.jhaggerty.xo.com>, "John
  1132. Haggerty" <johnh@imtcorp.com> wrote:
  1133.  
  1134. > What is the appropriate contents of the launchAppParameters field if I want
  1135. > to launch an app and have it immediately open a document.
  1136.  
  1137. See technote 1002 at
  1138. <http://devworld.apple.com/dev/technotes/tn/tn1002.html> for sample code
  1139. and a long discussion of how to do this correctly.
  1140.  
  1141. -- 
  1142. (Pointers to other Mac programming web sites at
  1143. <http://devworld.apple.com/dev/geeks.html>)
  1144.  
  1145. +++++++++++++++++++++++++++
  1146.  
  1147. From jordanz@altura.com (Jordan Zimmerman)
  1148. Date: Mon, 07 Oct 1996 09:28:39 -0800
  1149. Organization: Altura Software, Inc.
  1150.  
  1151. In article <01bbb17e$dc525700$14646496@INX-10293.jhaggerty.xo.com>, "John
  1152. Haggerty" <johnh@imtcorp.com> wrote:
  1153.  
  1154. > What is the appropriate contents of the launchAppParameters field if I want
  1155. > to launch an app and have it immediately open a document. After reading the
  1156. > LaunchApplication() and Apple Event documentation, it is still not clear to
  1157. > me exactly what data the various fields of the record want.
  1158. > Thanks,
  1159. > John Haggerty
  1160. > johnh@imtcorp.com
  1161.  
  1162. You have to set up an initial Apple Event to get the document to open. I
  1163. believe the Developer CDs have sample code for this.
  1164.  
  1165. -- 
  1166. Jordan Zimmerman
  1167. Altura Software, Inc.
  1168. home page: http://www.altura.com/jordanz
  1169.  
  1170. Harry Browne for President!    
  1171. http://www.harrybrowne96.org   1 (800) 682 1776
  1172. Stop the Browne Out! Let Harry Browne debate!     http://www.twr.com/STBO
  1173.  
  1174.  
  1175. ---------------------------
  1176.  
  1177. From uzs90z@uni-bonn.de (Michael Schuerig)
  1178. Subject: Learning low-level debugging?
  1179. Date: Sun, 6 Oct 1996 15:52:26 +0200
  1180. Organization: RHRZ - University of Bonn (Germany)            
  1181.  
  1182.  
  1183. I admit it, I've eschewed MacsBug as much as I could although I have
  1184. _MacsBug Ref and Debugging Guide_ lying around for several years. But I
  1185. guess I've got to learn it eventually. Are there any tutorials out there
  1186. or is learning-by-doing the only way?
  1187.  
  1188. Michael
  1189.  
  1190. - -
  1191. Michael Schuerig
  1192. mailto:uzs90z@uni-bonn.de
  1193. http://www.rhrz.uni-bonn.de/~uzs90z/
  1194.  
  1195. +++++++++++++++++++++++++++
  1196.  
  1197. From squires@crl.com (Scott Squires)
  1198. Date: Sun, 06 Oct 1996 13:14:12 -0800
  1199. Organization: Puffin Designs
  1200.  
  1201. In article <19961006155226814105@rhrz-ts2-p1.rhrz.uni-bonn.de>,
  1202. uzs90z@uni-bonn.de (Michael Schuerig) wrote:
  1203.  
  1204. >I admit it, I've eschewed MacsBug as much as I could although I have
  1205. >_MacsBug Ref and Debugging Guide_ lying around for several years. But I
  1206. >guess I've got to learn it eventually. Are there any tutorials out there
  1207. >or is learning-by-doing the only way?
  1208. >
  1209.  
  1210. If this if for 68k code then you might want to check out
  1211. How to Write Macintosh Software by Scott Knaster (Addison Wesley)
  1212.  
  1213. It steps through the entire debugging process (what compiled code looks
  1214. like, things to try, tricks, tips, etc)  
  1215.  
  1216. I don't think it's been updated for the PowerPC though.
  1217.  
  1218. Yopu might also check the Apple Web site for Develop magazine.
  1219. There have been a few articles/columns about the debugging process.
  1220. (There's even a puzzle in most of them involving solving an obscure
  1221. bug)
  1222.  
  1223. -scott
  1224.  
  1225.  
  1226. Scott Squires               "Insert funny stuff here"
  1227. squires@crl.com
  1228. ScottSquir@aol.com
  1229.  
  1230.  
  1231. +++++++++++++++++++++++++++
  1232.  
  1233. From tinman@itouch.net (Dave Newman)
  1234. Date: Sun, 06 Oct 1996 15:28:35 -0500
  1235. Organization: Real/Time Communications Internet customer posting
  1236.  
  1237. In article <19961006155226814105@rhrz-ts2-p1.rhrz.uni-bonn.de>,
  1238. uzs90z@uni-bonn.de (Michael Schuerig) wrote:
  1239.  
  1240. > I admit it, I've eschewed MacsBug as much as I could although I have
  1241. > _MacsBug Ref and Debugging Guide_ lying around for several years. But I
  1242. > guess I've got to learn it eventually. Are there any tutorials out there
  1243. > or is learning-by-doing the only way?
  1244.  
  1245. Michael,
  1246.  
  1247. "How to Write Macintosh Software" by Scott Knaster, gives a good set of
  1248. tutorials on debugging 68K code using low level debuggers. The last edition
  1249. I've seen was the 3rd edition and it did not cover PowerPC code. However,
  1250. many concepts for 68K debugging on the Mac cross over to PowerPC debugging
  1251. as well.
  1252.  
  1253. --Dave
  1254. -- 
  1255. Dave Newman
  1256. tinman@itouch.net
  1257.  
  1258. +++++++++++++++++++++++++++
  1259.  
  1260. From blob@ricochet.net
  1261. Date: Sun, 06 Oct 1996 15:00:30 -0700
  1262. Organization: (none)
  1263.  
  1264. In article <19961006155226814105@rhrz-ts2-p1.rhrz.uni-bonn.de>,
  1265. uzs90z@uni-bonn.de (Michael Schuerig) wrote:
  1266.  
  1267. > I admit it, I've eschewed MacsBug as much as I could although I have
  1268. > _MacsBug Ref and Debugging Guide_ lying around for several years. But I
  1269. > guess I've got to learn it eventually. Are there any tutorials out there
  1270. > or is learning-by-doing the only way?
  1271.  
  1272. There is an outstanding Developer University class offered quarterly by
  1273. Apple. See their web site at <http://devworld.apple.com/dev/du.shtml>. 
  1274. Unfortunately, it's only offered in a classroom setting, and I can't find
  1275. any information on that site concerning European classes.
  1276.  
  1277. The best "tutorials" I've seen for Macsbug come from the various cracker
  1278. sites where they are listed as an introduction to Macintosh hacking.  An
  1279. AltaVista search for "macintosh crack" will find something.
  1280.  
  1281. -- 
  1282. (Pointers to other Mac programming web sites at
  1283. <http://devworld.apple.com/dev/geeks.html>)
  1284.  
  1285. +++++++++++++++++++++++++++
  1286.  
  1287. From shane@wonk.demon.co.uk (Shane Badham)
  1288. Date: Tue, 8 Oct 1996 19:52:22 +0000
  1289. Organization: "At home!"
  1290.  
  1291. Michael Schuerig <uzs90z@uni-bonn.de> wrote:
  1292.  
  1293. > I admit it, I've eschewed MacsBug as much as I could although I have
  1294. > _MacsBug Ref and Debugging Guide_ lying around for several years. But I
  1295. > guess I've got to learn it eventually. Are there any tutorials out there
  1296. > or is learning-by-doing the only way?
  1297. > Michael
  1298. > ---
  1299. > Michael Schuerig
  1300. > mailto:uzs90z@uni-bonn.de
  1301. > http://www.rhrz.uni-bonn.de/~uzs90z/
  1302.  
  1303. Michael,
  1304.  
  1305. I bought "Debugging Macintosh Software with MacsBug" last year.  Its by
  1306. Konstantin Othmer (ex project leader for System 7 QuickDraw) and Jim
  1307. Straus also an ex Mac programmer from Apple.  They seen to know their
  1308. stuff OK. 
  1309.  
  1310. Book comes with a disk, but its version 6.2, a bit old.  However, much
  1311. of the tutorial stuff still holds good.  I have not finished all the
  1312. tutorial as yet (had to do other things, ;-), but I have learned much
  1313. already.
  1314.  
  1315. Did you know that MacsBug has templates for most of the System data
  1316. structures and using these you can see what they contain?
  1317.  
  1318. Jacket price is $34.95 (can't find the UK price).  Publishers are
  1319. Addison Wesley, ISBN 0-201-57049-1.  In the UK it's available from
  1320. Barnicotes of Falmouth, among others.
  1321.  
  1322. -- 
  1323. Regards,   Shane.
  1324. "A closed mouth gathers no feet!"
  1325.  
  1326. ---------------------------
  1327.  
  1328. From Domenico_Celli@mindlink.bc.ca
  1329. Subject: Mac GUI...how it works
  1330. Date: Tue, 8 Oct 1996 00:29:01 GMT
  1331. Organization: MIND LINK! - British Columbia, Canada
  1332.  
  1333. I am a C/C++ programmer who mainly works with UNIX, DOS and MS WIN32 
  1334. operatings systems (unfourtunately all my work has been on PCs).
  1335. After learning the Windows API and structure, I am interested in how the Mac 
  1336. manages processes, windows, redraws, etc
  1337. If there is drastic difference in many of the MacOSs, System 7 or 8 would be 
  1338. nice
  1339.  
  1340. thanx for any help
  1341.  
  1342.  
  1343. +++++++++++++++++++++++++++
  1344.  
  1345. From connorbd@cleo.bc.edu (Brian Connors)
  1346. Date: 8 Oct 1996 13:58:01 GMT
  1347. Organization: db&b
  1348.  
  1349. In article <Domenico_Celli.217.3259A04D@mindlink.bc.ca>,
  1350. Domenico_Celli@mindlink.bc.ca wrote:
  1351.  
  1352. > I am a C/C++ programmer who mainly works with UNIX, DOS and MS WIN32 
  1353. > operatings systems (unfourtunately all my work has been on PCs).
  1354. > After learning the Windows API and structure, I am interested in how the Mac 
  1355. > manages processes, windows, redraws, etc
  1356. > If there is drastic difference in many of the MacOSs, System 7 or 8 would be 
  1357. > nice
  1358.  
  1359. It's quite a bit different. I should say right off that I'm not a Windows
  1360. expert by any means, but I have read Petzold, so here's the best I can
  1361. tell you.
  1362.  
  1363. Windows: The Mac way doesn't revolve anywhere near as much around windows
  1364. as Windows does. In Win32, everything is based around talking to the
  1365. window; unless you're working with MDI windows, each instance of the
  1366. application has to handle all messages itself somehow. The upside of this,
  1367. however, is the DefaultWindowProc, which lets you ignore any behavior you
  1368. don't need to deal with. On the Mac, only one instance of an application
  1369. can be active at any given time, which means that a lot of things (event
  1370. handling and subsystem initialization are two things that come to mind)
  1371. are taken care of only once for every main window, then handled as the
  1372. programmer sees fit. IMHO this is probably more economical than one
  1373. window->one app, though the downside here is that nothing can be ignored.
  1374. Even if you're not interested in what happens to an event, you still have
  1375. to let the system know that you don't want the event you've been given. In
  1376. some ways it's theoretically more powerful than the Windows method, but in
  1377. practice the huge number of messages your app might recieve would appear
  1378. to make up the flexibility you'd think you'd lost.
  1379.  
  1380. Events: Both MacOS and Windows are event-driven in a basic sense of the
  1381. word, but there are serious differences in the way events are treated. The
  1382. MacOS has a relatively small number of event types, such as mouseup,
  1383. mousedown, keydown, update, and high-level. This is where the previous
  1384. point about not being able to ignore anything comes in; the Mac event loop
  1385. (the heart, incidentally, of the Mac's cooperative multitasking) always
  1386. returns to the WaitNextEvent call to recieve an event, then must decide
  1387. what to do with it. It first parses the event based on type, calling an
  1388. appropriate handler from in or around the event loop. The handler then
  1389. does the appropriate action based on the content of the rest of the event.
  1390.  
  1391.  
  1392. Mouse events are handled in what IMHO is a somewhat ad hoc manner that
  1393. Windows programmers don't seem to have to worry about: the coordinates of
  1394. the click are returned, and the app makes a toolbox call or two to figure
  1395. out where it happened. Key events are passed on to the app, and other
  1396. events (explained below) are dealt with appropriately. Any events that are
  1397. not appropriate for the app that recieved them are kicked back to the
  1398. system to send elsewhere (a holdover from pre-MultiFinder days). There are
  1399. a few special events that underlie the whole function of the interface:
  1400.  
  1401.    -Update events: This is the one event that should never be ignored.
  1402. When you recieve one, your app must drop everything and redraw or the
  1403. computer may hang.
  1404.    -High-Level Events: These events are relatively low-priority events
  1405. that underlie the AppleEvent Interprocess Messaging Protocol. AppleEvents
  1406. are the backbone of the modern Mac app; a core set of four is essentially
  1407. required for Mac programming, and AppleScript (MacOS's native scripting
  1408. language) is based entirely around AppleEvents. The downside is that the
  1409. architecture tends to be on the slow side; effective workarounds have been
  1410. developed. 
  1411.    
  1412. Other events tell an app that it's time to give up time or that it's time
  1413. to mount (or format) a disk. 
  1414.  
  1415. Resources: Resources are far more pervasive on the Mac than on Windows.
  1416. Until the rise of the PowerPC (applications for which have the code in the
  1417. data fork, a section of the file used for storing contiguous data)
  1418. everything was built from a resource; most of the interface still is. In
  1419. addition, due to the existence of the resource fork, resources are easily
  1420. found and altered; ResEdit hacks are a favorite pastime of many Mac power
  1421. users. 
  1422.  
  1423. Multitasking: I'm sure you're familiar with cooperative multitasking.
  1424. <soapbox>Which is true multitasking as far as I'm concerned. Your computer
  1425. is keeping track of several tasks at once, you're multitasking. It has
  1426. nothing to do with who's making the scheduling decisions. </soapbox>
  1427. Virtually all multitasking done on the Mac is of a cooperative nature,
  1428. with the exception of tasks tied to the Vertical Blanking Interrupt, which
  1429. is a way of preemptively multitasking certain tasks that don't affect
  1430. system-wide resources. (The name is a throwback to the days when all Macs
  1431. had 60hz monochrome screens.) In some ways Windows is more robust, though
  1432. only NT can claim full preemptive multitasking for everything. (And of
  1433. course Unix knows no other way, but that's another story.)
  1434.  
  1435. Memory Management: This is something of a sore spot with Mac users. The
  1436. early Macs lacked the hardware to implement a useful memory management
  1437. scheme, and the current implementation is an updated version of an ancient
  1438. hack designed to fit a full graphical OS into a 64K system (the size of
  1439. the prototype Macs of around 1983). Therefore, a lot of things have been
  1440. reverse-engineered and written around to the point where many apps (not to
  1441. name any names but the best known come from Washington state ;-) ) break
  1442. from one system release to the next. This happens to be a common problem
  1443. on the Mac; the System 7 and 7.5 transitions were known to be particularly
  1444. traumatic because things were removed or changed that programs depended
  1445. on. In general, MacOS has no native protected memory and no transparent
  1446. way to backpatch it in. 
  1447.  
  1448. Incidentally, Macs use both pointers and handles; a Mac handle is a
  1449. pointer to a pointer and unlike a Win32 handle can be double-dereffed just
  1450. like any other pointer to a pointer. 
  1451.  
  1452. System-level Services: This one could be batted back and forth endlessly.
  1453. As of System 7.5.3, the MacOS does have its own object model (SOM, which
  1454. is considered to be more robust than Windows' COM) and component
  1455. architecture (OpenDoc, a superset of OLE and yet much less complex to
  1456. program). MacOS has provided built-in scripting since 7.1.1 in the form of
  1457. AppleScript, though it's not yet PowerPC native. The MacOS also provides
  1458. shared library support (in what amounts to three different forms; Apple
  1459. has issued a Statement of Direction in favor of SOM with the Code Fragment
  1460. Manager and no longer encourages use of ASLM) and pretty well-constructed
  1461. networking support (OpenTransport, introduced with 7.5.2 and functional by
  1462. 7.5.3). The MacOS help systems are completely without equal; to the best
  1463. of my knowledge, AppleGuide (which shows you as well as tells you) is the
  1464. single best architecture for online help available. 
  1465.  
  1466. However, the age of the Mac once again shows; the non-threaded file system
  1467. has required some interesting hacks for applications such as news servers,
  1468. and makes the MacOS unsuitable for seriously stressful server
  1469. applications. (In other words, a small-to-medium corporate web site is no
  1470. big deal, but I believe most of Apple's big web servers are Unix-based...)
  1471.  
  1472.  
  1473. Media: The Mac has a number of useful things available. The graphics
  1474. architectures of the Mac are pioneering; QuickDraw, for example, was the
  1475. first mass-market systemwide graphics architecture available (it
  1476. originated on the Lisa and greatly improved on what Xerox had cooked up).
  1477. Quickdraw GX, despite its problems (it's a memory hog and does so much
  1478. that programmers don't know where to start), still offers a vast
  1479. improvement on all aspects of the Mac graphics and typography interface,
  1480. while QuickDraw 3D is very quickly becoming a major force in the 3D
  1481. graphics world (at least on the Mac). Quicktime adds digital video and
  1482. part of the General MIDI spec. 
  1483.  
  1484. On the whole, the MacOS is a very different beast indeed from Windows.
  1485. Though mapping the basic concepts is not especially difficult, you'll find
  1486. that a lot of stuff you did in Windows may be done in a very different
  1487. (even opposite) way on the Mac, and I think (excuse a bit of chauvinism
  1488. here and elsewhere) you'll find a lot of what you have in Windows turns
  1489. out to be only the tip of the iceberg on certain parts of the Mac. 
  1490.  
  1491. One point to make note of: the interfaces for many of the Mac's toolbox
  1492. managers aren't very consistent with others, the Printing and Resource
  1493. managers probably being the worst offenders. It's just something you have
  1494. to get used to. 
  1495.  
  1496. /Coach
  1497.  
  1498. +++++++++++++++++++++++++++
  1499.  
  1500. From Joseph Strout <jstrout@ucsd.edu>
  1501. Date: Tue, 8 Oct 1996 10:38:02 -0700
  1502. Organization: University of California, San Diego
  1503.  
  1504. On Tue, 8 Oct 1996 Domenico_Celli@mindlink.bc.ca wrote:
  1505.  
  1506. > After learning the Windows API and structure, I am interested in how the Mac 
  1507. > manages processes, windows, redraws, etc
  1508. > If there is drastic difference in many of the MacOSs, System 7 or 8 would be 
  1509. > nice
  1510.  
  1511. There are no drastic differences in the MacOS versions; newer versions
  1512. just have added features.
  1513.  
  1514. A key difference, I think, is the use of resources: Mac applications store
  1515. menus, window definitions, commonly used strings, dialog boxes, etc. in
  1516. the resource fork of the application.  These are most easily viewed and
  1517. edited with ResEdit (get from http://wwwhost.ots.utexas.edu/mac/main.html).
  1518.  
  1519. Another key difference, of course, is that the MacOS comes with an
  1520. extensive toolbox of built-in functions.  Most of your average Mac
  1521. application is handled by the system itself.
  1522.  
  1523. I recommend you start with a simple framework like MacZoop.  It's clean,
  1524. efficient, and small enough for you to see what's going on.  It's
  1525. available at: 
  1526.         http://www.warwick.ac.uk/~corbe/MacZoop/MacZoop.html
  1527.  
  1528. See also the Macintosh programming pages:
  1529.         http://devworld.apple.com/dev/geeks.html
  1530.  
  1531. ...and Inside Macintosh -- official Toolbox documentation:
  1532.         http://devworld.apple.com/dev/insidemac.shtml
  1533.  
  1534. Have fun!
  1535. -- Joe
  1536.  
  1537. ,------------------------------------------------------------------.
  1538. |    Joseph J. Strout           Department of Neuroscience, UCSD   |
  1539. |    jstrout@ucsd.edu           http://www-acs.ucsd.edu/~jstrout/  |
  1540. `------------------------------------------------------------------'
  1541.  
  1542.  
  1543. ---------------------------
  1544.  
  1545. From "Loren Peace" <peace@coe.missouri.edu>
  1546. Subject: Making OpenDoc Container Applications
  1547. Date: 6 Oct 96 03:33:05 -0500
  1548. Organization: University of Missouri - Columbia
  1549.  
  1550. Does anyone know of any good sources for ducuments about and/or tools for
  1551. how to create OpenDoc container applications.
  1552.  
  1553. Any help would be greatly appreciated.
  1554.  
  1555. Loren Peace                                      peace@coe.missouri.edu
  1556. =======================================================================
  1557. Once the avalanche has started, it is too late for the pebbles to vote.
  1558.           Kosh Naranek  (Babylon 5)
  1559. =======================================================================
  1560. Loren's WWW Pages: Dr. Who, Blakes7 - pics, sounds, stories, misc. docs
  1561. URL: http://www.coe.missouri.edu/~peace
  1562. =======================================================================
  1563.  
  1564.  
  1565.  
  1566.  
  1567. +++++++++++++++++++++++++++
  1568.  
  1569. From doverton@iglou.com (Dave Overton)
  1570. Date: 7 Oct 1996 17:38:40 GMT
  1571. Organization: NETCOM Network Operations
  1572.  
  1573. Loren,
  1574. The whole OpenDoc development suite is on http://www.opendoc.apple.com/
  1575. You also need a development system, they currently support MPW,
  1576. Metrowerks, and Symantek.
  1577. Dave Overton
  1578.  
  1579. In article <AE7CD8F4-231425@128.206.76.57>, "Loren Peace"
  1580. <peace@coe.missouri.edu> wrote:
  1581.  
  1582. > Does anyone know of any good sources for ducuments about and/or tools for
  1583. > how to create OpenDoc container applications.
  1584. > Any help would be greatly appreciated.
  1585. > Loren Peace                                      peace@coe.missouri.edu
  1586. > =======================================================================
  1587. > Once the avalanche has started, it is too late for the pebbles to vote.
  1588. >           Kosh Naranek  (Babylon 5)
  1589. > =======================================================================
  1590. > Loren's WWW Pages: Dr. Who, Blakes7 - pics, sounds, stories, misc. docs
  1591. > URL: http://www.coe.missouri.edu/~peace
  1592. > =======================================================================
  1593.  
  1594. +++++++++++++++++++++++++++
  1595.  
  1596. From Jim.Matthews@dartmouth.edu (Jim Matthews)
  1597. Date: Tue, 08 Oct 1996 08:52:20 -0400
  1598. Organization: Dartmouth College
  1599.  
  1600. In article <AE7CD8F4-231425@128.206.76.57>, "Loren Peace"
  1601. <peace@coe.missouri.edu> wrote:
  1602.  
  1603. >Does anyone know of any good sources for ducuments about and/or tools for
  1604. >how to create OpenDoc container applications.
  1605.  
  1606. Besides the OpenDoc developer releases, available from the "DR Live!"
  1607. section of <http://www.opendoc.apple.com>, you should look into
  1608. OpenContent from 6prime (<http://www.6prime.com>).  OpenContent is a bunch
  1609. of libraries that let applications call OpenDoc APIs and embed OpenDoc
  1610. parts.
  1611.  
  1612. -- 
  1613. Jim Matthews
  1614. Dartmouth Software Development
  1615. <http://www.dartmouth.edu/pages/softdev/>
  1616.  
  1617.  
  1618. ---------------------------
  1619.  
  1620. From uzs90z@uni-bonn.de (Michael Schuerig)
  1621. Subject: ODF vs. PP-MacApp-TCL?
  1622. Date: Sun, 29 Sep 1996 22:16:16 +0200
  1623. Organization: RHRZ - University of Bonn (Germany)            
  1624.  
  1625.  
  1626. The battle PowerPlant vs. MacApp vs. TCL is old an recurring. How about
  1627. ODF (OpenDoc Development Framework)? Is it another competitor or is it
  1628. playing a different game?
  1629.  
  1630. Michael
  1631.  
  1632. - -
  1633. Michael Schuerig
  1634. mailto:uzs90z@uni-bonn.de
  1635. http://www.rhrz.uni-bonn.de/~uzs90z/
  1636.  
  1637. +++++++++++++++++++++++++++
  1638.  
  1639. From adamnash@cs.stanford.edu (Adam Nash)
  1640. Date: Tue, 01 Oct 1996 00:58:32 -0800
  1641. Organization: Stanford University
  1642.  
  1643. It's playing a different game.
  1644.  
  1645. ODF, while not currently as mature as the other 3, offers great promise in
  1646. a number of ways.  First, it is designed similarly to PowerPlant, in terms
  1647. of its view hierarchy and limited-forest-like structure.  It also can
  1648. define custom view classes in resources, offering potentially
  1649. PowerPlant-like expandability.
  1650.  
  1651. ODF offers a few things that PowerPlant, TCL, and MacApp do not.  ODF is
  1652. (as of the R3 release, due Nov/Dec?) is cross-platform.  Plus, it includes
  1653. a cool, resolution-independent graphics framework.  Lastly, it is designed
  1654. with OpenDoc in mind.
  1655.  
  1656. You could use PowerPart to develop a part, and eventually that may be a
  1657. viable way of porting older code.   But these days, if you are going to
  1658. develop a part, use ODF.  With visual resource editors around the bend,
  1659. it's the way to go...
  1660.  
  1661.    - Adam
  1662.  
  1663. PS I didn't mention much of TCL or MacApp, basically because I feel
  1664. PowerPlant to be the more competitive of the three.
  1665.  
  1666. In article <199609292216161247713@rhrz-ts3-p5.rhrz.uni-bonn.de>,
  1667. uzs90z@uni-bonn.de (Michael Schuerig) wrote:
  1668.  
  1669. > The battle PowerPlant vs. MacApp vs. TCL is old an recurring. How about
  1670. > ODF (OpenDoc Development Framework)? Is it another competitor or is it
  1671. > playing a different game?
  1672. > Michael
  1673. > ---
  1674. > Michael Schuerig
  1675. > mailto:uzs90z@uni-bonn.de
  1676. > http://www.rhrz.uni-bonn.de/~uzs90z/
  1677.  
  1678. -- 
  1679. "The opinions expressed above do not necessarily represent
  1680. those of Stanford University, Apple Computer, or the 
  1681. United States of America."
  1682.  
  1683. Adam Nash                              
  1684. CS 198 Coordinator                       Apple Research Labs
  1685. adamnash@cs.stanford.edu                 adamnash@taurus.apple.com
  1686.  
  1687. http://www-cs-students.stanford.edu/~adamnash
  1688.  
  1689. +++++++++++++++++++++++++++
  1690.  
  1691. From mpinkert@cc.gatech.edu (Mike Pinkerton)
  1692. Date: Mon, 07 Oct 1996 14:31:51 -0400
  1693. Organization: Georgia Tech
  1694.  
  1695. >With visual resource editors around the bend,
  1696. >[ODF] is the way to go...
  1697.  
  1698. I know you can use MW Constructor to create views for ODF. Have you ever
  1699. looked into doing this? I'm wondering how easy it really is....
  1700.  
  1701. -- 
  1702. Mike Pinkerton
  1703. mpinkert@cc.gatech.edu      http://www.cc.gatech.edu/people/home/mpinkert/
  1704.  
  1705. Cyberdog: On the Internet, no one knows you're an OpenDoc part.
  1706.  
  1707. ---------------------------
  1708.  
  1709. From Alastair Matthews <alimatthews@geocities.com>
  1710. Subject: PowerBook examples?
  1711. Date: Sat, 28 Sep 1996 13:21:11 +0000
  1712. Organization: Trinity College, Dublin, Ireland
  1713.  
  1714. hi..
  1715.  
  1716. Could anybody point me to where I can find examples of _using_ the
  1717. routines related to powerbooks in Power.h?
  1718.  
  1719. thanks; please email me if you have any suggestions.
  1720.  
  1721. -- alastair
  1722. - ---------------
  1723. Alastair Matthews
  1724.  
  1725. "Doubt grows with knowledge"
  1726. -Goethe
  1727.  
  1728. email
  1729. alimatthews@geocities.com
  1730. www
  1731. http://www.geocities.com/SiliconValley/Park/4727
  1732.  
  1733. +++++++++++++++++++++++++++
  1734.  
  1735. From blob@ricochet.net
  1736. Date: Wed, 02 Oct 1996 11:38:12 -0700
  1737. Organization: (none)
  1738.  
  1739. In article <324D2647.6A72@geocities.com>, alimatthews@geocities.com wrote:
  1740.  
  1741. > Could anybody point me to where I can find examples of _using_ the
  1742. > routines related to powerbooks in Power.h?
  1743.  
  1744. <http://devworld.apple.com/dev/sc.html> points to Apple's sample code. 
  1745. There's probably something there; use their "find" page at
  1746. <http://devworld.apple.com/find.html>.
  1747.  
  1748. -- 
  1749. (Pointers to other Mac programming web sites at
  1750. <http://devworld.apple.com/dev/geeks.html>)
  1751.  
  1752. +++++++++++++++++++++++++++
  1753.  
  1754. From Mike Fahl <fahl@dataton.se>
  1755. Date: Sun, 06 Oct 1996 19:16:28 +0200
  1756. Organization: Dataton
  1757.  
  1758. I've used some of them in the past. Perhaps you could tell me which ones =
  1759.  
  1760. you're concerned about, and I may be able to give you some help.
  1761.  
  1762. Please CC any response as email=F6 as I don't visit this newsgroup very =
  1763.  
  1764. often.
  1765.  
  1766. Mike
  1767.  
  1768. ---------------------------
  1769.  
  1770. From uzs90z@uni-bonn.de (Michael Schuerig)
  1771. Subject: Setting volume cache to write-through?
  1772. Date: Sun, 6 Oct 1996 15:52:25 +0200
  1773. Organization: RHRZ - University of Bonn (Germany)            
  1774.  
  1775.  
  1776. Crashes during debugging are almost by definition not rare.
  1777. Unfortunately this sometimes corrupts the volume structure. One
  1778. countermeasure is to set the volume cache to the minimum size and as a
  1779. side effect slow disk access down.
  1780.  
  1781. CacheSaver by St. Clair Software might be a better solution as it
  1782. flushes the volumes periodically. But as it's a Control Panel (with
  1783. INIT) it might introduce compatibility problems. So I've written a
  1784. ten-line FBA that does (almost) the same.
  1785.  
  1786. Now I'm wondering if there's a better solution namely telling the File
  1787. Mgr once that it should write through the cache. I have no idea whether
  1788. this is possible. Does anyone know better?
  1789.  
  1790. Michael
  1791.  
  1792. - -
  1793. Michael Schuerig
  1794. mailto:uzs90z@uni-bonn.de
  1795. http://www.rhrz.uni-bonn.de/~uzs90z/
  1796.  
  1797. +++++++++++++++++++++++++++
  1798.  
  1799. From blob@ricochet.net
  1800. Date: Sun, 06 Oct 1996 14:54:45 -0700
  1801. Organization: (none)
  1802.  
  1803. In article <19961006155225814003@rhrz-ts2-p1.rhrz.uni-bonn.de>,
  1804. uzs90z@uni-bonn.de (Michael Schuerig) wrote:
  1805.  
  1806. > Crashes during debugging are almost by definition not rare.
  1807. > Unfortunately this sometimes corrupts the volume structure. One
  1808. > countermeasure is to set the volume cache to the minimum size and as a
  1809. > side effect slow disk access down.
  1810. > CacheSaver by St. Clair Software might be a better solution as it
  1811. > flushes the volumes periodically. But as it's a Control Panel (with
  1812. > INIT) it might introduce compatibility problems. So I've written a
  1813. > ten-line FBA that does (almost) the same.
  1814. > Now I'm wondering if there's a better solution namely telling the File
  1815. > Mgr once that it should write through the cache. I have no idea whether
  1816. > this is possible. Does anyone know better?
  1817.  
  1818. Look at IM:Files errata at the URL 
  1819. <http://devworld.apple.com/dev/technotes/tn/tn1041.html>
  1820.  
  1821. It contains the information:
  1822.  
  1823. *****
  1824.  
  1825. Volume cache control bit in vcbAtrb
  1826.  
  1827. Page 2-79, Volume Control Blocks
  1828.  
  1829. Add the following bit definition to vcbAtrb for System 7.5 or later:
  1830.  
  1831.  
  1832. Bit   Meaning
  1833. 10 Set if the volume's blocks should not be cached (System 7.5 
  1834.    and later only). This allows access to RAM disk volumes to 
  1835.    bypass the File Manager cache. It has the same affect as 
  1836.    setting the noCache bit (bit 5 of ioPosMode) for all File 
  1837.    Manager reads and writes to the volume. Non-block aligned 
  1838.    requests may still be accessed through the cache.
  1839.  
  1840. *****
  1841.  
  1842. -- 
  1843. (Pointers to other Mac programming web sites at
  1844. <http://devworld.apple.com/dev/geeks.html>)
  1845.  
  1846. ---------------------------
  1847.  
  1848. From bcland00@pop.uky.edu (Brian Landers)
  1849. Subject: Source code for opening GIF's and JPEG's?
  1850. Date: Thu, 03 Oct 1996 20:50:12 -0500
  1851. Organization: CampusMCI
  1852.  
  1853. This really ought to be in a FAQ(is it?)
  1854.  
  1855. Is there any Mac source code for reading and displaying GIF and JPEG format
  1856. files? I know you can read JPEG's using QuickTime, but I'd like to know how
  1857. it was done "in the old days". What would REALLY be cool(and what I may
  1858. write if it doesn't already exist) is an extension of the PowerPlant
  1859. LPicture class that will display a GIF or JPEG, given a FileSpec. IMHO,
  1860. that would be a VERY useful class for many different things, not just my
  1861. application(yet another image map editor).
  1862.  
  1863. Thanks in advance, email or Usenet replies are fine,
  1864. Brian Landers
  1865. bcland00@pop.uky.edu
  1866.  
  1867. +++++++++++++++++++++++++++
  1868.  
  1869. From tgl@netcom.com (Tom Lane)
  1870. Date: Fri, 4 Oct 1996 05:18:16 GMT
  1871. Organization: Netcom Online Communications Services
  1872.  
  1873. bcland00@pop.uky.edu (Brian Landers) writes:
  1874. > Is there any Mac source code for reading and displaying GIF and JPEG format
  1875. > files? I know you can read JPEG's using QuickTime, but I'd like to know how
  1876. > it was done "in the old days".
  1877.  
  1878. Actually, there never were any "old days" as far as JPEG goes ---
  1879. QuickTime has supported JPEG for just about as long as the format's
  1880. been popular.
  1881.  
  1882. You can certainly use the IJG JPEG code on a Mac if you feel like it
  1883. (see ftp.uu.net:/graphics/jpeg/ for source code).  The QuickTime code
  1884. is faster --- at least on 68K processors; I don't think they've optimized
  1885. it as carefully for PPC.  Reasons for using the IJG code anyway include:
  1886.   * direct support for net-standard JFIF files;
  1887.   * it's more robust with corrupted input;
  1888.   * QT doesn't handle progressive JPEG.
  1889. And if you like having source, there's no comparison :-)
  1890.  
  1891. > What would REALLY be cool(and what I may
  1892. > write if it doesn't already exist) is an extension of the PowerPlant
  1893. > LPicture class that will display a GIF or JPEG, given a FileSpec.
  1894.  
  1895. If you tackle this, I'd suggest a wrapper around the IJG decoder
  1896. as a good way to proceed for the JPEG part of it.
  1897.  
  1898. GIF code is available all over the place but you should think twice
  1899. before putting it into any money-making product.  Unisys will be wanting
  1900. a cut of your sales as patent royalties.  (I recently heard that they
  1901. are now coming down on freeware authors too, which if true has to be
  1902. one of the dumbest corporate moves since New Coke.  That'll just hasten
  1903. the move away from GIF and towards PNG, without making them a dime.)
  1904.  
  1905.             regards, tom lane
  1906.             organizer, Independent JPEG Group
  1907.             member, PNG development group
  1908.  
  1909. +++++++++++++++++++++++++++
  1910.  
  1911. From Greg Simon <grs124@psu.edu>
  1912. Date: Thu, 03 Oct 1996 23:53:34 +0000
  1913. Organization: Penn State University
  1914.  
  1915. Brian Landers wrote:
  1916. > Is there any Mac source code for reading and displaying GIF and JPEG format
  1917. > files? I know you can read JPEG's using QuickTime, but I'd like to know how
  1918. > it was done "in the old days". What would REALLY be cool(and what I may
  1919. > write if it doesn't already exist) is an extension of the PowerPlant
  1920.  
  1921. hi Brian-
  1922.  
  1923. Download the latest XV source code (3.x, I think). It has the code for
  1924. reading and writing most of today's popular image formats. I've used
  1925. code
  1926. from it often in various projects and things. Very handy.  
  1927.  
  1928. Only down side is that nearly all the routines hit the std C lib file
  1929. routines pretty heavily, so to replace them all with toolbox calls can
  1930. be tricky.
  1931.  
  1932. Use Infoseek or whatever to locate XV. Good Luck.
  1933.  
  1934. Greg
  1935.  
  1936. +++++++++++++++++++++++++++
  1937.  
  1938. From dbsears@ix.netcom.com (Daniel Sears)
  1939. Date: 4 Oct 1996 18:38:34 GMT
  1940. Organization: personal
  1941.  
  1942. Tom Lane's IJG code is quite excellent.  But you should look at
  1943. the GraphicsImporter services in the Quicktime 2.5.  It transparently
  1944. imports PICT, GIF, JPEG, SGI etc. in the proverbial five lines of code.
  1945.  
  1946. --Dan
  1947.  
  1948. +++++++++++++++++++++++++++
  1949.  
  1950. From lwjames@csn.net (Dr. Lawrence W. James)
  1951. Date: Fri, 04 Oct 1996 15:34:12 -0600
  1952. Organization: James Associates
  1953.  
  1954. In article <dbsears-0410961141290001@sfo-ca5-23.ix.netcom.com>,
  1955. dbsears@ix.netcom.com (Daniel Sears) wrote:
  1956.  
  1957. >you should look at
  1958. >the GraphicsImporter services in the Quicktime 2.5.  It transparently
  1959. >imports PICT, GIF, JPEG, SGI etc. in the proverbial five lines of code.
  1960.  
  1961. Where is the documentation on how to do this?
  1962.  
  1963. +++++++++++++++++++++++++++
  1964.  
  1965. From Raul Sobon <a.sobon@pharmacology.unimelb.edu.au>
  1966. Date: Mon, 07 Oct 1996 09:44:38 +1000
  1967. Organization: BMU
  1968.  
  1969. Tom Lane wrote:
  1970. > bcland00@pop.uky.edu (Brian Landers) writes:
  1971. > > Is there any Mac source code for reading and displaying GIF and JPEG format
  1972. > > files? I know you can read JPEG's using QuickTime, but I'd like to know how
  1973. > > it was done "in the old days".
  1974. > Actually, there never were any "old days" as far as JPEG goes ---
  1975. > QuickTime has supported JPEG for just about as long as the format's
  1976. > been popular.
  1977. > You can certainly use the IJG JPEG code on a Mac if you feel like it
  1978. > (see ftp.uu.net:/graphics/jpeg/ for source code).  The QuickTime code
  1979. > is faster --- at least on 68K processors; I don't think they've optimized
  1980. > it as carefully for PPC.  Reasons for using the IJG code anyway include:
  1981. >   * direct support for net-standard JFIF files;
  1982. >   * it's more robust with corrupted input;
  1983. >   * QT doesn't handle progressive JPEG.
  1984. > And if you like having source, there's no comparison :-)
  1985. > > What would REALLY be cool(and what I may
  1986. > > write if it doesn't already exist) is an extension of the PowerPlant
  1987. > > LPicture class that will display a GIF or JPEG, given a FileSpec.
  1988. > If you tackle this, I'd suggest a wrapper around the IJG decoder
  1989. > as a good way to proceed for the JPEG part of it.
  1990. > GIF code is available all over the place but you should think twice
  1991. > before putting it into any money-making product.  Unisys will be wanting
  1992. > a cut of your sales as patent royalties.  (I recently heard that they
  1993. > are now coming down on freeware authors too, which if true has to be
  1994. > one of the dumbest corporate moves since New Coke.  That'll just hasten
  1995. > the move away from GIF and towards PNG, without making them a dime.)
  1996. >                         regards, tom lane
  1997. >                         organizer, Independent JPEG Group
  1998. >                         member, PNG development group
  1999.  
  2000. What is PNG??
  2001. -Raul
  2002.  
  2003. +++++++++++++++++++++++++++
  2004.  
  2005. From dunham@pensee.com (David Dunham)
  2006. Date: 7 Oct 1996 17:41:01 GMT
  2007. Organization: Pensee Corporation
  2008.  
  2009. In article <dbsears-0410961141290001@sfo-ca5-23.ix.netcom.com>,
  2010. dbsears@ix.netcom.com (Daniel Sears) wrote:
  2011.  
  2012. > Tom Lane's IJG code is quite excellent.  But you should look at
  2013. > the GraphicsImporter services in the Quicktime 2.5.  It transparently
  2014. > imports PICT, GIF, JPEG, SGI etc. in the proverbial five lines of code.
  2015.  
  2016. Where's this documented? Our graphic format programmer knows this exists
  2017. but hasn't found how to do it.
  2018.  
  2019. David Dunham   Pensee Corporation   dunham@pensee.com
  2020. Voice/Fax: 206 783 7404             http://www.pensee.com/dunham/
  2021.     "I say we should listen to the customers and give them what they want."
  2022.     "What they want is better products for free." --Scott Adams
  2023.  
  2024. +++++++++++++++++++++++++++
  2025.  
  2026. From squires@crl.com (Scott Squires)
  2027. Date: Mon, 07 Oct 1996 22:51:58 -0800
  2028. Organization: Puffin Designs
  2029.  
  2030. In article <lwjames-ya023180000410961534120001@news-2.csn.net>,
  2031. lwjames@csn.net (Dr. Lawrence W. James) wrote:
  2032.  
  2033. >In article <dbsears-0410961141290001@sfo-ca5-23.ix.netcom.com>,
  2034. >dbsears@ix.netcom.com (Daniel Sears) wrote:
  2035. >
  2036. >>you should look at
  2037. >>the GraphicsImporter services in the Quicktime 2.5.  It transparently
  2038. >>imports PICT, GIF, JPEG, SGI etc. in the proverbial five lines of code.
  2039. >
  2040. >Where is the documentation on how to do this?
  2041.  
  2042. <http://www.QuickTimeFAQ.org/>
  2043.  
  2044. -scott
  2045.  
  2046.  
  2047. Scott Squires               "Insert funny stuff here"
  2048. squires@crl.com
  2049. ScottSquir@aol.com
  2050.  
  2051.  
  2052.  
  2053. ---------------------------
  2054.  
  2055. From mruggiero@access.ch (Markus Ruggiero)
  2056. Subject: Symantec linker and unresolved symbols
  2057. Date: Fri, 04 Oct 1996 08:54:33 +0200
  2058. Organization: ruCoTec Consulting and Technologies
  2059.  
  2060. I have asked the Symantec help desk about the following. Unfortunately
  2061. Symantec is of no help in this case. Does anybody have an idea? Can the
  2062. linker be hacked? fooled?
  2063.  
  2064. My message to Symantec:
  2065.  
  2066. Environment:
  2067. PowerMac 7500, latest Symantec C++ Environment
  2068.      
  2069. The linker flags unresolved symbols as errors. This prevents from running a 
  2070. partially completed application.
  2071.      
  2072. I am porting a large application from Windows to Macintosh. This 
  2073. application consists of over 400 source files (not including header files) 
  2074. with over 500'000 lines of C code. About 20% of this code is system 
  2075. dependent. It would be very helpful if I could build the Macintosh version 
  2076. incrementally and _RUN_ it under debugger control. That way I could 
  2077. implement function by function without having to resolve each and every 
  2078. symbol. As there are literally thousands of routines that call other 
  2079. routines directly and indirectly it would be too much work to provide 
  2080. linkable dummies for not-yet ported stuff. If the linker issued a warning 
  2081. instead of an error that would be great. I am absolutely aware of the fact 
  2082. that my application is likely to crash when hitting such an unresolved 
  2083. symbol but during development I know what parts of the code do not yet 
  2084. work. I used to do development on Digital OpenVMS with various compilers. 
  2085. The VMS linker generates these warnings and the executable is runable.
  2086.      
  2087. As the linker on the Macintosh adds code (stubs, glue, init routines etc) 
  2088. anyway it could add a small piece of code that is automatically referenced 
  2089. when the linker finds an unresolvable symbol. This code could just drop 
  2090. into Macsbug issuing a little message including the symbol name (some 
  2091. debugstr ("foo called") perhaps including __FILE__ and __LINE__).
  2092.      
  2093. There should be a linker preference to switch from warning to error.
  2094.      
  2095. Thank you for listening
  2096.      
  2097. - -markus---
  2098.  
  2099.  
  2100. and the answer was
  2101.  
  2102.      Hello,
  2103.      
  2104.      The Symantec linker does not offer such a feature. Unfortunately you 
  2105.      will need to satisfy each symbol requirement.
  2106.      
  2107.      Patrick Hoonhout
  2108.      Symantec Product Support
  2109.      Win Internet Tools (C++/Cafe)
  2110.  
  2111. -- 
  2112. e-mail: mruggiero@access.ch
  2113.  
  2114. +++++++++++++++++++++++++++
  2115.  
  2116. From Dave Ewing <dewing@symantec.com>
  2117. Date: Fri, 04 Oct 1996 11:10:08 -0600
  2118. Organization: Symantec Corp.
  2119.  
  2120. Markus Ruggiero wrote:
  2121. > I have asked the Symantec help desk about the following. Unfortunately
  2122. > Symantec is of no help in this case. Does anybody have an idea? Can the
  2123. > linker be hacked? fooled?
  2124. > ...
  2125. > The linker flags unresolved symbols as errors. This prevents from running a
  2126. > partially completed application.
  2127. > ...
  2128. > and the answer was
  2129. >      Hello,
  2130. >      The Symantec linker does not offer such a feature. Unfortunately you
  2131. >      will need to satisfy each symbol requirement.
  2132. >      Patrick Hoonhout
  2133. >      Symantec Product Support
  2134. >      Win Internet Tools (C++/Cafe)
  2135. > --
  2136. > e-mail: mruggiero@access.ch
  2137.  
  2138. Patrick's response was somewhat terse, but correct. I'm not personally
  2139. aware of any
  2140. linker that would do what you want (for C or C++, that is), though it
  2141. would be usefull.
  2142.  
  2143. I'd suggest that you take the linker error window, save it to a file,
  2144. and convert the
  2145. text into the appropriate stub routines. A few good editing macros
  2146. should do the trick.
  2147.  
  2148. Dave
  2149. Visual Cafe Debugger Engineer
  2150. Symantec Corp.
  2151.  
  2152. +++++++++++++++++++++++++++
  2153.  
  2154. From Brad Howes <bhowes@cssun3.corp.mot.com>
  2155. Date: 07 Oct 1996 09:45:39 -0700
  2156. Organization: Motorola, Inc.
  2157.  
  2158. >>>> 'Markus Ruggiero (mruggiero@access.ch)' asked the following:
  2159.  
  2160. [snip]
  2161.  MR> I am porting a large application from Windows to Macintosh. This
  2162.  MR> application consists of over 400 source files (not including header files)
  2163.  MR> with over 500'000 lines of C code. About 20% of this code is system
  2164.  MR> dependent. It would be very helpful if I could build the Macintosh version
  2165.  MR> incrementally and _RUN_ it under debugger control. That way I could
  2166.  MR> implement function by function without having to resolve each and every
  2167.  MR> symbol. As there are literally thousands of routines that call other
  2168.  MR> routines directly and indirectly it would be too much work to provide
  2169.  MR> linkable dummies for not-yet ported stuff. If the linker issued a warning
  2170.  MR> instead of an error that would be great.
  2171. [snip]
  2172.  
  2173. Use AppleScript, Frontier, or MacPerl to scan your C files and generate
  2174. placeholder routines - or perhaps there's a way to declare said routines as
  2175. members of a shared library to be resolved at runtime. Regardless, there is
  2176. some work involved, though it should be easy to automate.
  2177.  
  2178. -- 
  2179. Brad Howes                          Motorola E-Mail ID: XBH001
  2180. EMT Development                     SMTP E-Mail: bhowes@cssun3.corp.mot.com
  2181. Motorola Corporate - MD H1780       Voice: 602 441 1522  Fax: 602 441 5455
  2182.  
  2183. ---------------------------
  2184.  
  2185. From Mark & Erika Reichert <reicher1@gate.net>
  2186. Subject: TCP-IP apps automatically dialing PPP, etc.
  2187. Date: Sun, 06 Oct 1996 08:21:36 -0400
  2188. Organization: CyberGate, Inc.
  2189.  
  2190. Does anyone know how applications like Eudora, Netscape, Explorer, etc.
  2191. automatically dial your Internet Service Provider via PPP, SLIP, etc.
  2192. when needed?  The MacTCP and OpenTransport calls don't seem to cause
  2193. this to happen.  Does this happen via the Mac toolbox at all or is there
  2194. a completely different mechanism at work?
  2195.  
  2196. Thanks in advance.
  2197.  
  2198. +++++++++++++++++++++++++++
  2199.  
  2200. From kindall@manual.com (Jerry Kindall)
  2201. Date: Sun, 06 Oct 1996 13:39:24 -0400
  2202. Organization: Manual Labor
  2203.  
  2204. In article <3257A44D.1712@gate.net>, reicher1@gate.net wrote:
  2205.  
  2206. >Does anyone know how applications like Eudora, Netscape, Explorer, etc.
  2207. >automatically dial your Internet Service Provider via PPP, SLIP, etc.
  2208. >when needed?  The MacTCP and OpenTransport calls don't seem to cause
  2209. >this to happen.  Does this happen via the Mac toolbox at all or is there
  2210. >a completely different mechanism at work?
  2211.  
  2212. When an application attempts to send an IP packet, Open Transport or
  2213. MacTCP passes the request to the Link Access Protocol (LAP), which is a
  2214. program such as FreePPP or MacSLIP.  The LAP knows whether the connection
  2215. is up or down, and dials the modem if necessary.  There are no specific OS
  2216. calls to tell the LAP to bring the connection up, although some LAPs
  2217. provide Apple Events for the purpose.
  2218.  
  2219. >Thanks in advance.
  2220.  
  2221. --
  2222. Jerry Kindall <kindall@manual.com>
  2223. Manual Labor  <http://www.manual.com/>
  2224.  
  2225. Technical Writing; Internet & WWW Consulting
  2226.  
  2227. ---------------------------
  2228.  
  2229. From fchang@qualcomm.com (Fang-Pin Chang)
  2230. Subject: THINK Reference
  2231. Date: Tue, 01 Oct 1996 13:13:55 -0800
  2232. Organization: Qualcomm Incorporated
  2233.  
  2234. Does anyone know where I can get my hands on THINK Reference?  A search
  2235. through Alta Vista revealed many links to Symantec, but none of them are
  2236. valid....
  2237.  
  2238. -- 
  2239.  Fang-Pin Chang           __                            ___
  2240.  fchang@qualcomm.com     |  |      _  |  _  _  .__ .__   |  .__  _
  2241. _________________________|_\| (_| (_| | (_ (_) ||| |||___|_ | | (_ ._
  2242.  
  2243. +++++++++++++++++++++++++++
  2244.  
  2245. From Online@MacTech.com ( nick.c @MT )
  2246. Date: Tue, 01 Oct 1996 20:02:55 -0800
  2247. Organization: MacTech Magazine
  2248.  
  2249.  
  2250.  
  2251. fchang@qualcomm.com (Fang-Pin Chang) wrote:
  2252.  
  2253. >Does anyone know where I can get my hands on THINK Reference?  A search
  2254. >through Alta Vista revealed many links to Symantec, but none of them are
  2255. >valid....
  2256.  
  2257.  
  2258.    It's now owned by Xplain corp, the folks who bring you MacTech
  2259.      Magazine :-)
  2260.  
  2261.    Check out the following for more info:
  2262.  
  2263.       <http://www.mactech.com/mactech.com/cdrom/>
  2264.  
  2265. ____Nicholas C. DeMello, Ph.D.________________________________________
  2266.  
  2267.    Online from MacTech Magazine, for Mac OS Programmers and Developers
  2268.      http://www.MacTech.com/
  2269.                                        _/   _/  _/  _/_/_/   _/   _/  
  2270.   Chemistry: Nick@chem.UCLA.edu       _/_/ _/  _/  _/   _/  _/_/_/ 
  2271.     MacTech: Online@MacTech.com      _/ _/_/  _/  _/       _/ _/    
  2272.        http://www.chem.ucla.edu/~nick/   _/  _/   _/_/_/  _/   _/     
  2273.  
  2274. +++++++++++++++++++++++++++
  2275.  
  2276. From Online@MacTech.com ( nick.c @MT )
  2277. Date: Tue, 01 Oct 1996 20:11:27 -0800
  2278. Organization: MacTech Magazine
  2279.  
  2280.  
  2281.  
  2282. fchang@qualcomm.com (Fang-Pin Chang) wrote:
  2283.  
  2284. >Does anyone know where I can get my hands on THINK Reference?  A search
  2285. >through Alta Vista revealed many links to Symantec, but none of them are
  2286. >valid....
  2287.  
  2288.  
  2289.    It's now owned by Xplain corp, the folks who bring you MacTech
  2290.      Magazine :-)
  2291.  
  2292.    Among otherways to acquire it, you can get it on a CD with
  2293.      all the MacToolbox and ANSI databases, plus all 11 years of
  2294.      MacTech magazine with hypertext links to and from the
  2295.      Toolbox DB.  (Let's you get more detailed discussions and
  2296.      examples as well as the regular TR fair).  Check out the 
  2297.      following for more info:
  2298.  
  2299.       <http://www.mactech.com/cdrom/>
  2300.  
  2301.  
  2302.  
  2303. .
  2304.  
  2305. ____Nicholas C. DeMello, Ph.D.________________________________________
  2306.  
  2307.    Online from MacTech Magazine, for Mac OS Programmers and Developers
  2308.      http://www.MacTech.com/
  2309.                                        _/   _/  _/  _/_/_/   _/   _/  
  2310.   Chemistry: Nick@chem.UCLA.edu       _/_/ _/  _/  _/   _/  _/_/_/ 
  2311.     MacTech: Online@MacTech.com      _/ _/_/  _/  _/       _/ _/    
  2312.        http://www.chem.ucla.edu/~nick/   _/  _/   _/_/_/  _/   _/     
  2313.  
  2314. +++++++++++++++++++++++++++
  2315.  
  2316. From shawn@ultranet.com (Shawn O'Donnell)
  2317. Date: Tue, 01 Oct 1996 23:42:46 -0400
  2318. Organization: Cardiff Communications
  2319.  
  2320. In article <fchang-0110961313550001@fchang-mac.qualcomm.com>,
  2321. fchang@qualcomm.com (Fang-Pin Chang) wrote:
  2322.  
  2323. > Does anyone know where I can get my hands on THINK Reference? 
  2324.  
  2325. I THINK that Symantec sold THINK Reference to the publishers of MacTech
  2326. magazine.  You can get a copy of THINK Reference 2.0 from "Developer
  2327. Depot" at Xplain Corp's web site:  www.devdepot.com
  2328.  
  2329. You may need to buy the MacTech vols 1-11 CD-ROM ($89) to get THINK
  2330. Reference.  It's not a bad deal, though.  For about the price of the
  2331. original, you get a ton of fun stuff.  
  2332.  
  2333. Caveat emptor--THINK Reference covers the old Inside Mac volumes, only.  I
  2334. think that Xplain is trying to get Apple to license the new series of IM
  2335. so that they can package it using the THINK Reference search engine.  (Or
  2336. was that Metrowerks?)  Whoever.  Wish them luck. 
  2337.  
  2338. --Shawn
  2339.  
  2340. -- 
  2341. Shawn O'Donnell                            shawn@ultranet.com
  2342. k3hi@wa1phy.ampr.org                       Framingham, Massachusetts
  2343.  
  2344. +++++++++++++++++++++++++++
  2345.  
  2346. From Online@MacTech.com ( nick.c @MT )
  2347. Date: Wed, 02 Oct 1996 10:15:04 -0800
  2348. Organization: MacTech Magazine
  2349.  
  2350.  
  2351.  
  2352. shawn@ultranet.com (Shawn O'Donnell) wrote:
  2353.  
  2354. >Caveat emptor--THINK Reference covers the old Inside Mac volumes, only.  I
  2355. >think that Xplain is trying to get Apple to license the new series of IM
  2356. >so that they can package it using the THINK Reference search engine.  (Or
  2357. >was that Metrowerks?)  Whoever.  Wish them luck. 
  2358.  
  2359.  
  2360.    Xplain is interested in licensing the new material, and we're
  2361.      waiting for Apple to get back to us on it (feel free to send
  2362.      a quick note to devsupport@apple.com encouraging them to do
  2363.      so :-).
  2364.  
  2365.    But keep in mind that the vast majority of toolbox commands
  2366.      are covered in the current TR data bases--not too much stuff
  2367.      needs to be added, and most users won't notice when we do.
  2368.      We just want to "top off" the current data bases, so we
  2369.      have all the bases covered.
  2370.  
  2371.    BTW, there's a beta version of TR 2.2 on the CD as well
  2372.      as the current release of the engine--feel free to send 
  2373.      feedback on it to us (you can send comments/observatins/bugs
  2374.      to me and I'll pass 'em on).
  2375.  
  2376.  
  2377. .
  2378.  
  2379. ____Nicholas C. DeMello, Ph.D.________________________________________
  2380.  
  2381.    Online from MacTech Magazine, for Mac OS Programmers and Developers
  2382.      http://www.MacTech.com/
  2383.                                        _/   _/  _/  _/_/_/   _/   _/  
  2384.   Chemistry: Nick@chem.UCLA.edu       _/_/ _/  _/  _/   _/  _/_/_/ 
  2385.     MacTech: Online@MacTech.com      _/ _/_/  _/  _/       _/ _/    
  2386.        http://www.chem.ucla.edu/~nick/   _/  _/   _/_/_/  _/   _/     
  2387.  
  2388. +++++++++++++++++++++++++++
  2389.  
  2390. From bierman@apple.com (Peter Bierman)
  2391. Date: Wed, 02 Oct 1996 18:42:18 -0800
  2392. Organization: I do not speak for Apple Computer!
  2393.  
  2394. In article <Online-0210961015040001@news.ucla.edu>, Online@MacTech.com (
  2395. nick.c @MT ) wrote:
  2396.  
  2397. >    But keep in mind that the vast majority of toolbox commands
  2398. >      are covered in the current TR data bases--not too much stuff
  2399. >      needs to be added, and most users won't notice when we do.
  2400. >      We just want to "top off" the current data bases, so we
  2401. >      have all the bases covered.
  2402.  
  2403.  
  2404. Excellent, but please take the time to add the notes and sample code that
  2405. makes TRef still more usefull than QuickView for leaning how to use a
  2406. function you haven't used before. QV is awesome in it's completeness, but
  2407. when I want to read about how an API call is used, I still use TRef.
  2408.  
  2409. -pmb
  2410.  
  2411. -- 
  2412. lunatic@cs.wisc.edu     <A HREF="http://dax.cs.wisc.edu/~lunatic/">me</a>
  2413.  Q: Am I unique and special in the universe?
  2414.  A: There are over 10,000 major university and corporate sites running
  2415.     exact duplicates of you in the present release version.
  2416.  
  2417. +++++++++++++++++++++++++++
  2418.  
  2419. From earl@netcom.com (Earl Vickers)
  2420. Date: Mon, 7 Oct 1996 22:06:34 GMT
  2421. Organization: none
  2422.  
  2423. In article <fchang-0110961313550001@fchang-mac.qualcomm.com>,
  2424. Fang-Pin Chang <fchang@qualcomm.com> wrote:
  2425. >Does anyone know where I can get my hands on THINK Reference?  A search
  2426. >through Alta Vista revealed many links to Symantec, but none of them are
  2427. >valid....
  2428.  
  2429. I have a copy for sale, $35 or best offer.
  2430.  
  2431. -- 
  2432. -- Earl Vickers        earl@netcom.com
  2433.  
  2434. ---------------------------
  2435.  
  2436. From rtt@synapse.net (rtt)
  2437. Subject: Think C, Symantec C
  2438. Date: 7 Oct 1996 02:47:23 GMT
  2439. Organization: neuron
  2440.  
  2441. Whoah, have I been sleeping or something. I have a problem which would
  2442. probably resolve itself to either finger trouble or
  2443. installation/corruption problem. I went to the Symantec site to check
  2444. around and I find no further references to Symantec C or Think C.
  2445.  
  2446. Has Symantec dropped these products, like, that's it, all gone and I
  2447. now have to find another C tool?
  2448.  
  2449. By the by, the following code, produces 0 bytes for each printf,
  2450. although on my Alpha (WIndows NT) and my DECstation (UNIX), it produces
  2451. the expected results. Any ideas?
  2452. -=-=-=-=-=-=-=
  2453. #include <stdio.h>
  2454.  
  2455.  
  2456. main()
  2457. {
  2458.  
  2459. printf("char has a size of %d bytes.\n", sizeof(char));
  2460. printf("int has a size of %d bytes.\n", sizeof(int));
  2461. printf("short has a size of %d bytes.\n", sizeof(short));
  2462. printf("long has a size of %d bytes.\n", sizeof(long));
  2463. printf("float has a size of %d bytes.\n", sizeof(float));
  2464. printf("double has a size of %d bytes.\n", sizeof(double));
  2465.  
  2466.     return 0;
  2467. }
  2468. =-=-=-=-=-=-=-
  2469. This mind left BLANK intentionaly!
  2470.  
  2471. +++++++++++++++++++++++++++
  2472.  
  2473. From tree@apple.com (Tom Emerson)
  2474. Date: Mon, 07 Oct 1996 09:36:59 -0400
  2475. Organization: Apple Computer, Inc.
  2476.  
  2477. In article <539qvr$g1i$1@piano.synapse.net>, rtt@synapse.net (rtt) wrote:
  2478.  
  2479. >Whoah, have I been sleeping or something. I have a problem which would
  2480. >probably resolve itself to either finger trouble or
  2481. >installation/corruption problem. I went to the Symantec site to check
  2482. >around and I find no further references to Symantec C or Think C.
  2483.  
  2484. Yes, the marketing wizards who control the Symantec web presence evidently
  2485. feel that non-Java development tools are unimportant.
  2486.  
  2487. >Has Symantec dropped these products, like, that's it, all gone and I
  2488. >now have to find another C tool?
  2489.  
  2490. No, the products haven't been dropped.
  2491.  
  2492. >By the by, the following code, produces 0 bytes for each printf,
  2493. >although on my Alpha (WIndows NT) and my DECstation (UNIX), it produces
  2494. >the expected results. Any ideas?
  2495.  
  2496. That's because sizeof() returns type size_t, which is defined as an
  2497. unsigned int for SC. You're int size is probably 4-bytes, but the version
  2498. of the ANSI library you're using expects 2-byte ints, so printf is only
  2499. looking at the upper word of the sizeof() result, which is 0. So either
  2500. recompile the ANSI library to use 4-byte ints or change "%d" to "%ld" and
  2501. you'll get what you expect.
  2502.  
  2503.     -tre
  2504.  
  2505. --
  2506. Tom Emerson                                                 Cambridge R&D
  2507. Senior Software Engineer                             Apple Computer, Inc.
  2508. <mailto:tree@apple.com>                  <http://www.tiac.net/users/tree>
  2509.  
  2510. +++++++++++++++++++++++++++
  2511.  
  2512. From symscott@devtools.symantec.com (Symantec/Scott Morison)
  2513. Date: Mon, 07 Oct 1996 11:58:13 -0800
  2514. Organization: Symantec Corporation
  2515.  
  2516. In article <tree-ya[big number]@news.apple.com>, tree@apple.com (Tom
  2517. Emerson) wrote:
  2518. > In article <539qvr$g1i$1@piano.synapse.net>, rtt@synapse.net (rtt) wrote:
  2519. > >Whoah, have I been sleeping or something. I have a problem which would
  2520. > >probably resolve itself to either finger trouble or
  2521. > >installation/corruption problem. I went to the Symantec site to check
  2522. > >around and I find no further references to Symantec C or Think C.
  2523. > Yes, the marketing wizards who control the Symantec web presence evidently
  2524. > feel that non-Java development tools are unimportant.
  2525.  
  2526. We just (last week) moved and completely remodled our web site and there
  2527. are still several areas that are waiting for completion. Unfortunately,
  2528. our Development Tools section is one of the areas awaiting post. It should
  2529. be up in the next week or so. Sorry for the confusion. (F=ma;)
  2530.  
  2531. > >Has Symantec dropped these products, like, that's it, all gone and I
  2532. > >now have to find another C tool?
  2533. > No, the products haven't been dropped.
  2534.  
  2535. "Rumors of [our] death have been greatly exaggerated."  - Twain
  2536.  
  2537.  
  2538. Scott Morison 
  2539. Symantec Internet Tools Technical Support
  2540. Symantec Corporation
  2541. -
  2542.  
  2543. -- 
  2544.  
  2545. For more information on this or any other C/C++/Pascal/Cafe
  2546. issue please feel free to post us a note on our News Server or call: 
  2547.  
  2548. News Server : service.symantec.com
  2549. Tech Support: 541/465-8470
  2550. Cust Service: 800/441-7234
  2551.  
  2552. +++++++++++++++++++++++++++
  2553.  
  2554. From rtt@synapse.net (rtt)
  2555. Date: 8 Oct 1996 04:12:56 GMT
  2556. Organization: neuron
  2557.  
  2558. Thankyou, thankyou, thankyou, one and all. Yes, as I had suspected,
  2559. finger trouble on my part. I'd say I feel foolish on this, but I've
  2560. been a system administrator for so long, my coding is very poor, in
  2561. addition to my understanding of C. I thank everyone for their gracious
  2562. input.
  2563.  
  2564. rtt
  2565.  
  2566. This mind left BLANK intentionaly!
  2567.  
  2568. ---------------------------
  2569.  
  2570. From Pieter.Proot@med.kuleuven.ac.be (Pieter Proot)
  2571. Subject: Think Pascal question
  2572. Date: Tue, 01 Oct 1996 15:36:06 +0200
  2573. Organization: KU Leuven
  2574.  
  2575. Hello,
  2576.  
  2577. I was wondering if Think Pascal, from Symantic, Vs. 4.01 is the latest
  2578. version of this software, and if it is still supported?  Where can I find
  2579. updates and new libraries for it?
  2580.  
  2581. Thanks in advance.
  2582.  
  2583. Pieter
  2584.  
  2585. Pieter.Proot@med.kuleuven.ac.be
  2586.  
  2587. +++++++++++++++++++++++++++
  2588.  
  2589. From "Tedd F. Sperling" <sperling@sperling.com>
  2590. Date: Wed, 02 Oct 1996 09:06:44 +0000
  2591. Organization: Sperling Corporation
  2592.  
  2593. Pieter Proot wrote:
  2594. > Hello,
  2595. > I was wondering if Think Pascal, from Symantic, Vs. 4.01 is the latest
  2596. > version of this software, and if it is still supported?  Where can I find
  2597. > updates and new libraries for it?
  2598. > Thanks in advance.
  2599. > Pieter
  2600. > Pieter.Proot@med.kuleuven.ac.be
  2601.  
  2602. -- 
  2603.  
  2604. Hi:
  2605.  
  2606. The latest version I have is 4.0.2.
  2607.  
  2608. While I purchased this version in January, 1996, I also purchased
  2609. Symantec C++ at the same time.
  2610.  
  2611. To my surprise, Pascal came with C++. So, in fact, I actually purchased
  2612. Pascal when I didn't have to.
  2613.  
  2614. My inquiries to Symantec about this have fallen on deaf hears. So, don't
  2615. be alarmed if you find your questions and inquiries about Pascal going
  2616. unanswered.
  2617.  
  2618. IMHO, they have problems.
  2619.  
  2620. tedd
  2621.  
  2622.  
  2623.    ____
  2624.   |[  ]| mac programmer                             tedd f. sperling
  2625.   |[__]|                               mailto: sperling@sperling.com
  2626.   |___-|                http://www.sojourn.com/~sperling/resume.html
  2627. - -
  2628.  
  2629. +++++++++++++++++++++++++++
  2630.  
  2631. From zaphod@dna.ca (Zaphod)
  2632. Date: Wed, 2 Oct 1996 14:37:34 -0400
  2633. Organization: dna.ca
  2634.  
  2635. Pieter.Proot@med.kuleuven.ac.be,Internet writes:
  2636. >I was wondering if Think Pascal, from Symantic, Vs. 4.01 is the latest
  2637. >version of this software, and if it is still supported?  Where can I
  2638. >find
  2639. >updates and new libraries for it?
  2640.  
  2641. Version 4.02 is the latest version of THINK Pascal that I've ever
  2642. seen/used.
  2643. I can't remember the FTP site that contains the update though.  Seems
  2644. to me it was one of the default bookmarks that came with Anarchie.
  2645.  
  2646. - ------
  2647. -Zaphod.
  2648. - ------
  2649.  
  2650. +++++++++++++++++++++++++++
  2651.  
  2652. From ingemar@lysator.liu.se (Ingemar Ragnemalm)
  2653. Date: 3 Oct 1996 08:51:24 GMT
  2654. Organization: (none)
  2655.  
  2656. "Tedd F. Sperling" <sperling@sperling.com> writes:
  2657.  
  2658. >Pieter Proot wrote:
  2659.  
  2660. >> I was wondering if Think Pascal, from Symantic, Vs. 4.01 is the latest
  2661. >> version of this software, and if it is still supported?  Where can I find
  2662. >> updates and new libraries for it?
  2663.  
  2664. >The latest version I have is 4.0.2.
  2665.  
  2666. >While I purchased this version in January, 1996, I also purchased
  2667. >Symantec C++ at the same time.
  2668.  
  2669. >To my surprise, Pascal came with C++. So, in fact, I actually purchased
  2670. >Pascal when I didn't have to.
  2671.  
  2672. The Think Pascal in SC++ is, as far as I know, 4.5d4 or something like that.
  2673. 4.0.2 is the latest "final" version, while 4.5 is only in "d" version.
  2674. I think it is very nice that they include this preliminary version in
  2675. SC++. I have 4.0.2, but consider buying SC++ just to get the LS Pascal
  2676. compiler and TP 4.5 in the absolutely latest version - and to be able to
  2677. tell Symantec that I am still willing to pay for their Pascal compilers.
  2678. (I think I bought Think Pascal 4 in 1991, so that was a while back.)
  2679.  
  2680. There are also new interfaces available, that you can download from Symantec.
  2681. At their site, you can also get an updater from 4.0.1 to 4.0.2. It fixes
  2682. a few bugs.
  2683.  
  2684. >My inquiries to Symantec about this have fallen on deaf hears. So, don't
  2685. >be alarmed if you find your questions and inquiries about Pascal going
  2686. >unanswered.
  2687.  
  2688. My support questions to Symantec has always been unanswered, even when Think
  2689. Pascal was actively supported. If you need help with Think Pascal, check out
  2690. comp.lang.pascal.mac.
  2691.  
  2692. --
  2693. - -
  2694. Ingemar Ragnemalm, PhD
  2695. Image processing, Mac shareware games
  2696. E-mail address: ingemar@isy.liu.se or ingemar@lysator.liu.se
  2697.  
  2698. +++++++++++++++++++++++++++
  2699.  
  2700. From laurent@planon_4.planon.qc.ca (Laurent Daudelin)
  2701. Date: 8 Oct 1996 17:21:18 GMT
  2702. Organization: Planon TELEXPERTISE, Inc.
  2703.  
  2704. In <msg2822.thr-904b3ff4.2caaf86@dna.ca> Zaphod wrote:
  2705. > Pieter.Proot@med.kuleuven.ac.be,Internet writes:
  2706. > >I was wondering if Think Pascal, from Symantic, Vs. 4.01 is the latest
  2707. > >version of this software, and if it is still supported?  Where can I
  2708. > >find
  2709. > >updates and new libraries for it?
  2710. > Version 4.02 is the latest version of THINK Pascal that I've ever
  2711. > seen/used.
  2712. > I can't remember the FTP site that contains the update though.  Seems
  2713. > to me it was one of the default bookmarks that came with Anarchie.
  2714. > --------
  2715. > -Zaphod.
  2716. > --------
  2717.  
  2718. There is also a 4.5dr1 (or dr2?) on the latest Symantec C++ CD, v8 rel 5. 
  2719. Didn't have a chance to play with it but, as I may recall, it was supposed to 
  2720. be compatible with the Universal Headers.
  2721.  
  2722. -Laurent.
  2723.  
  2724. --
  2725. ******************************************************************
  2726. Laurent Daudelin, Lead Software Engineer- Planon TELEXPERTISE Inc.
  2727. laurent@planon.qc.ca <-- NeXTMail welcome! (MIME Mail welcome too!)
  2728.  
  2729.  
  2730. ---------------------------
  2731.  
  2732. From dstone@chem.utoronto.ca (David Stone)
  2733. Subject: Traps.h & asm.h in Sym C-C++ 6
  2734. Date: Mon, 7 Oct 1996 14:11:30 GMT
  2735. Organization: University of Toronto Chemistry
  2736.  
  2737. Should I be using asm.h or Traps.h for C compilation with the
  2738. Universal Interfaces??
  2739.  
  2740. Background:
  2741. I'm in the process of trying to get the Universal Interfaces 2.1.3
  2742. to work with my Sym C/C++ 6.0.  What I've done so far is create
  2743. two folders outside the development tree, one for the interface
  2744. files and MacHeader shipped with the compiler, the other for the
  2745. Universal Interfaces.  I then switched the headers/MacHeader files
  2746. in the "Mac #includes" folder so that I'm currently working with
  2747. the UI 2.1.3 headers.  I've recompiled MacHeaders and am seeing
  2748. how much of an immediate effect this has on my existing projects.
  2749. I'm running into problems with doubly-defined trap names between
  2750. asm.h (in the THINK #includes folder) and Traps.h (in the UI 2.1.3
  2751. folder).  
  2752.  
  2753. The code in question is something hacked out of sample code in 
  2754. "Think Ref", which provides a routine to check if a given
  2755. trap is available. Both MacHeaders are #including <asm.h> and 
  2756. not <Traps.h>.  The source file then #includes <Traps.h>.  
  2757. When I compile using the original headers, there is no problem,
  2758. but when I compile with the UI headers, I get "invalid redclaration
  2759. of _ShutDown".  Since _ShutDown is defined in BOTH versions of
  2760. Traps.h, I don't understand what's going on.  If I remove the
  2761. #include <Traps.h>, then I don't have some of the macros I need
  2762. in the code, with predictable results.....
  2763.  
  2764. So, do I NEED the asm.h file included in my projects and, if so,
  2765. is there a way of also including Traps.h which won't cause these
  2766. problems AND will also be compatible with the original header
  2767. files.  (I read the compiler manual, but it wasn't terribly
  2768. clear on this....)
  2769.  
  2770.  
  2771. Thanks for any insight,
  2772.  
  2773. Dave Stone
  2774.  
  2775. +++++++++++++++++++++++++++
  2776.  
  2777. From tree@apple.com (Tom Emerson)
  2778. Date: Tue, 08 Oct 1996 09:25:02 -0400
  2779. Organization: Apple Computer, Inc.
  2780.  
  2781. In article <dstone-071096100003@csgmac.chem.utoronto.ca>,
  2782. dstone@chem.utoronto.ca (David Stone) wrote:
  2783.  
  2784. >Should I be using asm.h or Traps.h for C compilation with the
  2785. >Universal Interfaces??
  2786.  
  2787. You should be using <Traps.h> for all new code. Indeed, I deprecated the
  2788. entire contents of the "THINK #includes" for the 8.0 release (except for
  2789. SetUpA4.h), though some components (like the TCL) were never updated to
  2790. reflect that.
  2791.  
  2792. You *will* have to tweak your code a bit, or work out some hackery with
  2793. asm.h so that it will use Traps.h instead.
  2794.  
  2795. Similarly you should *not* use <LoMem.h> either, rather use the Universal
  2796. LowMem.h instead.
  2797.  
  2798.  
  2799.     -tre
  2800.  
  2801. --
  2802. Tom Emerson                                                 Cambridge R&D
  2803. Senior Software Engineer                             Apple Computer, Inc.
  2804. <mailto:tree@apple.com>                  <http://www.tiac.net/users/tree>
  2805.  
  2806.  
  2807. ---------------------------
  2808.  
  2809. From cjones@mantle.colorado.edu (Craig Jones)
  2810. Subject: VIP-Basic: Opinions?
  2811. Date: Tue, 1 Oct 96 22:32:31 GMT
  2812. Organization: CIRES, University of Colorado at Boulder
  2813.  
  2814. I have an old (long) QuickBASIC code I've been dreading getting into
  2815. something more modern.  I bought and used FutureBasic for awhile and was
  2816. disappointed by the incredibly poor performance of floating point operations
  2817. (this is scientific programming) and a large number of system corruptions I
  2818. managed to produce.
  2819.  
  2820. I looked over the web page for VIP Basic (at www.mstay.com) and downloaded
  2821. their demo (v2.0R2, I think).  It seems very slick and nice, but I'm not
  2822. sure how it really does as at producing compiled code, especially floating
  2823. point speed, and how robust a real working version really is.  So I'd
  2824. appreciate any comments from users, happy or sad; comments on ease of
  2825. porting lengthy old QB would be helpful, too.
  2826.  
  2827. Craig Jones                                    cjones@mantle.colorado.edu
  2828.       Research Associate, CIRES, University of Colorado, Boulder
  2829. WWW: http://cires.colorado.edu/people/jones.craig/CHJ_home.html
  2830.  
  2831. +++++++++++++++++++++++++++
  2832.  
  2833. From "Tedd F. Sperling" <sperling@sperling.com>
  2834. Date: Wed, 02 Oct 1996 09:16:40 +0000
  2835. Organization: Sperling Corporation
  2836.  
  2837. Craig Jones wrote:
  2838. > I have an old (long) QuickBASIC code I've been dreading getting into
  2839. > something more modern.  I bought and used FutureBasic for awhile and was
  2840. > disappointed by the incredibly poor performance of floating point operations
  2841. > (this is scientific programming) and a large number of system corruptions I
  2842. > managed to produce.
  2843. > I looked over the web page for VIP Basic (at www.mstay.com) and downloaded
  2844. > their demo (v2.0R2, I think).  It seems very slick and nice, but I'm not
  2845. > sure how it really does as at producing compiled code, especially floating
  2846. > point speed, and how robust a real working version really is.  So I'd
  2847. > appreciate any comments from users, happy or sad; comments on ease of
  2848. > porting lengthy old QB would be helpful, too.
  2849. > Craig Jones                                    cjones@mantle.colorado.edu
  2850. >       Research Associate, CIRES, University of Colorado, Boulder
  2851. > WWW: http://cires.colorado.edu/people/jones.craig/CHJ_home.html
  2852.  
  2853. Hi:
  2854.  
  2855. I do math calculations with FB and have never had any problems.
  2856.  
  2857. If you need speed, then you can always use SANE from FB.
  2858.  
  2859. Also, FB is coming out soon with a new version that incorporates easier
  2860. SANE access.
  2861.  
  2862.  
  2863.  
  2864. tedd
  2865. -- 
  2866.    ____
  2867.   |[  ]| mac programmer                             tedd f. sperling
  2868.   |[__]|                               mailto: sperling@sperling.com
  2869.   |___-|                http://www.sojourn.com/~sperling/resume.html
  2870. - -
  2871.  
  2872. +++++++++++++++++++++++++++
  2873.  
  2874. From pecora@zoltar.nrl.navy.mil (Louis M. Pecora)
  2875. Date: Wed, 02 Oct 1996 10:11:12 +0100
  2876. Organization: Naval Research Laboratory
  2877.  
  2878. In article <cjones.1194596791A@news.colorado.edu>,
  2879. cjones@mantle.colorado.edu (Craig Jones) wrote:
  2880.  
  2881. > I have an old (long) QuickBASIC code I've been dreading getting into
  2882. > something more modern.  I bought and used FutureBasic for awhile and was
  2883. > disappointed by the incredibly poor performance of floating point operations
  2884. > (this is scientific programming) and a large number of system corruptions I
  2885. > managed to produce.
  2886. > I looked over the web page for VIP Basic (at www.mstay.com) and downloaded
  2887. > their demo (v2.0R2, I think).  It seems very slick and nice, but I'm not
  2888. > sure how it really does as at producing compiled code, especially floating
  2889. > point speed, and how robust a real working version really is.  So I'd
  2890. > appreciate any comments from users, happy or sad; comments on ease of
  2891. > porting lengthy old QB would be helpful, too.
  2892.  
  2893. Future Basic, I believe, uses BCD arithmetic (no FPU use) so it will be
  2894. very slow for floating point.
  2895.  
  2896. In the past I've used True Basic and liked it very much.  It is easy to
  2897. use, standard (written by the original BASIC inventors), and has quick and
  2898. simple graphics.  For good numerical performance (for a BASIC -- still
  2899. slower than Fortan or C) and ease of use and setup, I highly recommend it.
  2900.  
  2901. If you really want the best performance or you want to get into the
  2902. nitty-gritty of Mac UI/API programming it may not be the best.  I think
  2903. there are some hooks into the system so you can do some toolbox stuff, but
  2904. that's not True Basic's forte.
  2905.  
  2906. Unfortunately, I don't have contact information for them here, but I bet a
  2907. web search on "True Basic" would show something.  Anyone else have contact
  2908. info?
  2909.  
  2910. -- 
  2911. Louis M. Pecora
  2912. pecora@zoltar.nrl.navy.mil
  2913.  == My views and opinions are not those of the U.S. Navy. ==
  2914.  
  2915. - ------------------------------------------------------------------
  2916. * Check out the home page for the 4th Experimental Chaos Conference! 
  2917.  
  2918.              http://natasha.umsl.edu/Exp_Chaos4
  2919. - -------------------------------------------------------------------
  2920.  
  2921. +++++++++++++++++++++++++++
  2922.  
  2923. From Jeff Pearson <qualtech@qualtech-inc.com>
  2924. Date: Wed, 02 Oct 1996 12:12:48 -0700
  2925. Organization: Monumental Network Systems
  2926.  
  2927. Craig Jones wrote:
  2928. ...
  2929. > I looked over the web page for VIP Basic (at www.mstay.com) and downloaded
  2930. > their demo (v2.0R2, I think).  It seems very slick and nice, but I'm not
  2931. > sure how it really does as at producing compiled code, especially floating
  2932. > point speed, and how robust a real working version really is.  So I'd
  2933. > appreciate any comments from users, happy or sad; comments on ease of
  2934. > porting lengthy old QB would be helpful, too....
  2935.  
  2936. I can not specifically tell you about VIP-Basic, but here at work I program with VIP-C 
  2937. and the built-in compiler will make applications for you but the size and speed of 
  2938. running those applications is slow.  If you have CodeWarrior 9 you can use that to 
  2939. compile your VIP-C code (linking, etc. between both of them is built into VIP-C).
  2940.  
  2941. Hope that helps you a little bit.
  2942.  
  2943. Jeff
  2944.  
  2945. +++++++++++++++++++++++++++
  2946.  
  2947. From "Thomas L. Ferrell" <ferrelltl@ornl.gov>
  2948. Date: 3 Oct 1996 06:37:13 GMT
  2949. Organization: Oak Ridge National Lab
  2950.  
  2951. VIP Basic got high marks from MacWorld. FB II can be used for numerical 
  2952. work if you know the tricks and is pretty good for oop. There was a 
  2953. thorough review of FB posted here a few months ago. You should read the 
  2954. MacWorld review of VIP to see if it suits you. True Basic is one of my 
  2955. favorites,especially as the references are so excellent. For more 
  2956. info,including info on the freeware Chipmunk Basic (interpreter), and 
  2957. info on how to find the companies, see
  2958. <http://www.fys.ruu.nl/~bergmann/basic.html>
  2959. and don't overlook the "general" category,which lists offerings for Mac 
  2960. as well as other platforms.
  2961. Thomas L. Ferrell, PhD
  2962. Health Sciences Research Division
  2963. Oak Ridge National Laboratory and 
  2964. Dept. of Physics, University of Tennessee
  2965.  
  2966.  
  2967.  
  2968. +++++++++++++++++++++++++++
  2969.  
  2970. From jafederi@artsci.wustl.edu (John Federico)
  2971. Date: Wed, 02 Oct 1996 09:20:09 -0600
  2972. Organization: Washington University School of Law
  2973.  
  2974.  I bought and used FutureBasic for awhile and was
  2975. > disappointed by the incredibly poor performance of floating point operations
  2976. > (this is scientific programming) and a large number of system corruptions I
  2977. > managed to produce.
  2978. Just as a side note, there was a thread on AOL's Ariel message board about
  2979. how to do fast math in FutureBasic.  Also, I seem to recall a SANE library
  2980. of functions included with FutureBasic II. (regular FB uses BCD math).
  2981.  
  2982. -rico
  2983.  
  2984. +++++++++++++++++++++++++++
  2985.  
  2986. From oneel@arupa.gsfc.nasa.gov (Bruce O'Neel)
  2987. Date: Thu, 03 Oct 1996 07:28:26 -0400
  2988. Organization: NASA Goddard Space Flight Center -- Greenbelt, Maryland USA
  2989.  
  2990. In article <pecora-0210961011120001@pecora7600.nrl.navy.mil>,
  2991. pecora@zoltar.nrl.navy.mil (Louis M. Pecora) wrote:
  2992.  
  2993. > In article <cjones.1194596791A@news.colorado.edu>,
  2994. > cjones@mantle.colorado.edu (Craig Jones) wrote:
  2995.  
  2996. > Future Basic, I believe, uses BCD arithmetic (no FPU use) so it will be
  2997. > very slow for floating point.
  2998. > In the past I've used True Basic and liked it very much.  It is easy to
  2999. > use, standard (written by the original BASIC inventors), and has quick and
  3000. > simple graphics.  For good numerical performance (for a BASIC -- still
  3001. > slower than Fortan or C) and ease of use and setup, I highly recommend it.
  3002. > If you really want the best performance or you want to get into the
  3003. > nitty-gritty of Mac UI/API programming it may not be the best.  I think
  3004. > there are some hooks into the system so you can do some toolbox stuff, but
  3005. > that's not True Basic's forte.
  3006. > Unfortunately, I don't have contact information for them here, but I bet a
  3007. > web search on "True Basic" would show something.  Anyone else have contact
  3008. > info?
  3009.  
  3010. Hi,
  3011.   After a bit of poking around (aren't the web and search engines great? 
  3012. It saves me from having to do real work :-) True BASIC has a web site at
  3013. http://www.truebasic.com/.  I know, a bit logical, but I didn't think of
  3014. it.  There also looks like there is an interesting site at
  3015. http://www.kie.berkeley.edu/people/alex/work.html.  This person (Alex
  3016. Cuthbert) is the Unix True BASIC maintainer. They look like they are moving
  3017. forward with new versions (True BASIC 5.0) and something called WebBasic
  3018. (think Basic applettes).
  3019.  
  3020. From the webpages the contact info is TRUE BASIC INC. - 12 COMMERCE AVENUE,
  3021. WEST LEBANON NH 03784-1669 Tel: 800 436 2111 Fax: 603 298 7015 Sales
  3022. Questions: sales@truebasic.com.
  3023.  
  3024. thanks!
  3025.  
  3026. bruce
  3027.  
  3028. +++++++++++++++++++++++++++
  3029.  
  3030. From Yves_Gendron@mouse.edmonton.ab.ca (Yves Gendron)
  3031. Date: 08 Oct 1996 10:17:08 GMT
  3032. Organization: MOUSE
  3033.  
  3034. Here is some of my own experience at floating-point computations involving
  3035. heavy trigonometric function use. I can only say the following.
  3036.  
  3037. Yes, FutureBasic is quite slow at floating-point computations because it uses
  3038. a Binary Coded Decimal scheme (BCD) rather than the SANE scheme for
  3039. floating-point computations. You can speed up your code by using SANE
  3040. (Standard Apple Numeric Environment) calls from within FutureBasic version 1
  3041. or 2. However these FutureBasic calls to SANE involve doing a lot of
  3042. conversion from 'extended' to 'BCD' number format, back and forth, and the
  3043. speed improvement in the overall computation (50 to 200%, or something like
  3044. that) depends heavily on how many math operations are involved for each
  3045. computation.
  3046.  
  3047. I converted a FutureBasic program to VIP-BASIC v1.03/1.05 to check its speed
  3048. for floating-point operations a long while ago. One problem was that the
  3049. VIP-BASIC code, being interpreted rather than compiled code,  would run even
  3050. slower than the FutureBasic code for most floating-point math operations,
  3051. especially for the trigonometric functions. So not much gain there, though
  3052. VIP-BASIC code was more compatible with the old QuickBasic code.
  3053.  
  3054. Simply, for floating-point math operations, QuickBasic was hard to beat as
  3055. its math library was so good that it ran floating-point computations a fair
  3056. bit faster (even faster with an FPU) than THINK Pascal v4.02,  and only about
  3057. 15-20% slower than THINK C v5.04. That was what you would call a quick Basic
  3058. (no pun intended). Too bad Microsoft decided to quit supporting QuickBasic,
  3059. they had a good product for scientific applications.
  3060.  
  3061. If you really need the floating-point speed for your QuickBasic code I would
  3062. suggest converting the QuickBasic code to C,  or easier , convert the code to
  3063. THINK Pascal. THINK Pascal is still being sold by Symantec, though I do not
  3064. know if they've ever updated their last version (4.02) of the THINK Pascal
  3065. software of a few years ago. However, they have a new Universal Header file
  3066. for THINK Pascal (as of the Fall of 95).
  3067.  
  3068. Just my $0.02 worth of comments on the topic,
  3069.  
  3070. YG
  3071.  
  3072.  
  3073. ---------------------------
  3074.  
  3075. From chipperc@msgpop.cs.mci.com (Chip Cuntz)
  3076. Subject: WANTED: Simple FAT DA...
  3077. Date: 8 Oct 1996 00:53:13 GMT
  3078. Organization: The Fun House of Life
  3079.  
  3080. I need to do a simple DA or APPL that does stuff via a Modal Dialog... 
  3081. Anyone have any examples of this that I can tweak?  Can anybody point me
  3082. in the direction of such an example...  I am out of the Mac world these
  3083. days in lieu of a UNIX job, but would love to put my CodeWarrior to
  3084. work!
  3085.  
  3086. Chip
  3087.  
  3088. Please reply via eMail...
  3089.  
  3090. +++++++++++++++++++++++++++
  3091.  
  3092. From blob@ricochet.net
  3093. Date: Tue, 08 Oct 1996 08:13:45 -0700
  3094. Organization: (none)
  3095.  
  3096. In article <chipperc-0710961853190001@ppp95.cs.mci.com>,
  3097. chipperc@msgpop.cs.mci.com (Chip Cuntz) wrote:
  3098.  
  3099. > I need to do a simple DA or APPL that does stuff via a Modal Dialog...
  3100.  
  3101. Don't write desk accessories.  They are obsolete. 
  3102.  
  3103. There are many examples in the sample code at <http://devworld.apple.com>.
  3104. Perhaps more details about what exactly you are trying to do (posted, not
  3105. sent just to me) would result in more detailed replies.
  3106.  
  3107. -- 
  3108. (Pointers to other Mac programming web sites at
  3109. <http://devworld.apple.com/dev/geeks.html>)
  3110.  
  3111.  
  3112. ---------------------------
  3113.  
  3114. From vergnaud@via.ecp.fr (Guillaume Vergnaud)
  3115. Subject: WinSock.lib for macintosh
  3116. Date: 8 Oct 1996 10:12:34 GMT
  3117. Organization: Ecole Centrale Paris, France
  3118.  
  3119. Hi,
  3120.  
  3121. I have to port a window's client, which uses winsocks, onto the mac.
  3122. It would be very cool and much more simple if I had a winsock library
  3123.  (or its sources) for the macintosh. I need an msql library, too.
  3124. Anyone knows about it ?
  3125.  
  3126. Thanx.
  3127.  
  3128. Guillaume.
  3129.  
  3130. +++++++++++++++++++++++++++
  3131.  
  3132. From "Michael Ferrador" <n2kra@orn.com>
  3133. Date: 9 Oct 1996 04:14:10 GMT
  3134. Organization: FerraSoft
  3135.  
  3136.  
  3137.  
  3138. Guillaume Vergnaud <vergnaud@via.ecp.fr> wrote in article
  3139. <53d9ei$8vo@piston.ecp.fr>...
  3140. > Hi,
  3141. > I have to port a window's client, which uses winsocks, onto the mac.
  3142. > It would be very cool and much more simple if I had a winsock library
  3143. >  (or its sources) for the macintosh. I need an msql library, too.
  3144. > Anyone knows about it ?
  3145.    I have MS Visual C++ 4.1, and was thinking about getting it for the
  3146. Macinosh.
  3147. Does anyone know if it has libraries to call MacTCP/OT?
  3148.  
  3149. +++++++++++++++++++++++++++
  3150.  
  3151. From parkec3@rpi.edu (Chris Parker)
  3152. Date: Wed, 09 Oct 1996 10:00:29 -0400
  3153. Organization: Rensselaer Polytechnic Institute, Troy NY, USA
  3154.  
  3155. In article <01bbb599$1861b1a0$6e00402c@mjf>, "Michael Ferrador"
  3156. <n2kra@orn.com> wrote:
  3157.  
  3158. > Guillaume Vergnaud <vergnaud@via.ecp.fr> wrote in article
  3159. > <53d9ei$8vo@piston.ecp.fr>...
  3160.  
  3161. << Stuff from Guillaume deleted >>
  3162.  
  3163. >    I have MS Visual C++ 4.1, and was thinking about getting it for the
  3164. > Macinosh.
  3165. > Does anyone know if it has libraries to call MacTCP/OT?
  3166.  
  3167. Remember, when you do that what you're getting is a cross-compiler (and I
  3168. haven't heard great things about it).
  3169.  
  3170. Hey, on a related note (i.e. Guillaume's earlier message in this thread) -
  3171. I too am looking for a winsock library for the Mac (preferably one that
  3172. does both MacTCP and OT - I don't ask for much :^)...
  3173.  
  3174. Any pointers?
  3175. - Chris
  3176.  
  3177. - -------------------------------------------------------------------
  3178. Check out the Design Conference Room Page!    http://www.dcr.rpi.edu/
  3179. - -------------------------------------------------------------------
  3180. Chris Parker                "If it wasn't hard, everyone would do it.
  3181. parkec3@rpi.edu                     The hard is what makes it great."
  3182. http://www.rpi.edu/~parkec3/     - Tom Hanks, _A_League_of_Their_Own_
  3183.  
  3184. +++++++++++++++++++++++++++
  3185.  
  3186. From jordanz@altura.com (Jordan Zimmerman)
  3187. Date: Tue, 08 Oct 1996 11:25:49 -0800
  3188. Organization: Altura Software, Inc.
  3189.  
  3190. In article <53d9ei$8vo@piston.ecp.fr>, vergnaud@via.ecp.fr (Guillaume
  3191. Vergnaud) wrote:
  3192.  
  3193. > Hi,
  3194. > I have to port a window's client, which uses winsocks, onto the mac.
  3195. > It would be very cool and much more simple if I had a winsock library
  3196. >  (or its sources) for the macintosh. I need an msql library, too.
  3197. > Anyone knows about it ?
  3198. > Thanx.
  3199. > Guillaume.
  3200.  
  3201. NetManage has a WinSock implementation for the Mac that is very good
  3202. (http://www.netmanage.com). However, their implementation is currently
  3203. limited to 64 connections, but that should improve in the future.
  3204.  
  3205. -- 
  3206. Jordan Zimmerman
  3207. Altura Software, Inc.
  3208. home page: http://www.altura.com/jordanz
  3209.  
  3210. Harry Browne for President!    
  3211. http://www.harrybrowne96.org   1 (800) 682 1776
  3212. Stop the Browne Out! Let Harry Browne debate!     http://www.twr.com/STBO
  3213.  
  3214. ---------------------------
  3215.  
  3216. From jordanz@altura.com (Jordan Zimmerman)
  3217. Subject: [Q] Internet Config help
  3218. Date: Wed, 02 Oct 1996 15:45:32 -0800
  3219. Organization: Altura Software, Inc.
  3220.  
  3221. Hello,
  3222.  
  3223. I'm currently using Internet Config to launch URLs from my app and it
  3224. works great.
  3225.  
  3226. Now, I have the need to open a text file in Netscape (or whatever browser
  3227. is the user's preference). Can I do this with Internet Config? I can't
  3228. figure out if I can from the docs. Basically, I have an FSSpec that I'd
  3229. like to pass to Internet Config and say "Hey, IC, open this with a WWW
  3230. Browser - Thanks!".
  3231.  
  3232. -- 
  3233. Jordan Zimmerman
  3234. Altura Software, Inc.
  3235. home page: http://www.altura.com/jordanz
  3236.  
  3237. Harry Browne for President!    
  3238. http://www.harrybrowne96.org   1 (800) 682 1776
  3239. Stop the Browne Out! Let Harry Browne debate!     http://www.twr.com/STBO
  3240.  
  3241. +++++++++++++++++++++++++++
  3242.  
  3243. From pmth02jc@umassd.edu (Jim Correia)
  3244. Date: Thu, 03 Oct 1996 23:18:54 -0500
  3245. Organization: University of Massachusetts Dartmouth
  3246.  
  3247. In article <jordanz-0210961545490001@204.147.232.52>, jordanz@altura.com
  3248. (Jordan Zimmerman) wrote:
  3249.  
  3250. >Hello,
  3251. >
  3252. >I'm currently using Internet Config to launch URLs from my app and it
  3253. >works great.
  3254. >
  3255. >Now, I have the need to open a text file in Netscape (or whatever browser
  3256. >is the user's preference). Can I do this with Internet Config? I can't
  3257. >figure out if I can from the docs. Basically, I have an FSSpec that I'd
  3258. >like to pass to Internet Config and say "Hey, IC, open this with a WWW
  3259. >Browser - Thanks!".
  3260.  
  3261. I only know of one way to do it, and it isn't pretty.
  3262.  
  3263. You can ask IC for the web helper.  It will return an ICAppSpec (or
  3264. something of that sort) that contains a name and a creator code.  You then
  3265. have to search all mounted drives for the app, launch it, and send it an
  3266. odoc with the fsspec.
  3267.  
  3268. I'd be interested to know if there is an easier way.
  3269.  
  3270. You may be able to convert the fsspec into a full path, then convert that
  3271. to a file:/// type url, then pass it to IC, but this route would require
  3272. that the user has set up file:/// url's to be routed to their browser,
  3273. which is very unlikely.
  3274.  
  3275. Good Luck,
  3276. Jim
  3277.  
  3278. -- 
  3279. Jim Correia
  3280. Software Developer
  3281. SimCalc Project     <http://tango.mth.umassd.edu/>
  3282. pmth02jc@umassd.edu <http://tango.mth.umassd.edu/correia/>
  3283.  
  3284. +++++++++++++++++++++++++++
  3285.  
  3286. From Jordan Zimmerman <jordanz@altura.com>
  3287. Date: Fri, 04 Oct 1996 18:02:15 -0800
  3288. Organization: Altura Software, Inc.
  3289.  
  3290. > In article <jordanz-0210961545490001@204.147.232.52>, jordanz@altura.com
  3291. > (Jordan Zimmerman) wrote:
  3292. > >Hello,
  3293. > >
  3294. > >I'm currently using Internet Config to launch URLs from my app and it
  3295. > >works great.
  3296. > >
  3297. > >Now, I have the need to open a text file in Netscape (or whatever browser
  3298. > >is the user's preference). Can I do this with Internet Config? I can't
  3299. > >figure out if I can from the docs. Basically, I have an FSSpec that I'd
  3300. > >like to pass to Internet Config and say "Hey, IC, open this with a WWW
  3301. > >Browser - Thanks!".
  3302. > I only know of one way to do it, and it isn't pretty.
  3303.  
  3304. [snip]
  3305.  
  3306. I figured out how to do it. Indeed, I needed to generate a full path for
  3307. the file and then issue a LaunchURL with "file". However, that Helper
  3308. isn't normally set up in Internet Config, so I first check for the
  3309. presence of the "file" Helper preference, if I don't find it, I create
  3310. it using the http Helper preference.
  3311.  
  3312. I've distilled this into a code module that I can make available if
  3313. there's interest.
  3314.  
  3315. +++++++++++++++++++++++++++
  3316.  
  3317. From fpottier@pauillac.inria.fr (Francois Pottier)
  3318. Date: 7 Oct 1996 09:54:56 GMT
  3319. Organization: INRIA Rocquencourt, BP 105, 78153 Le Chesnay Cedex, France
  3320.  
  3321. In article <3255C198.5A51@altura.com>,
  3322. Jordan Zimmerman  <jordanz@altura.com> wrote:
  3323.  
  3324. >I figured out how to do it.
  3325.  
  3326. Yup, that's exactly what I do too.
  3327.  
  3328. --
  3329. Francois Pottier
  3330. Francois.Pottier@inria.fr
  3331. http://pauillac.inria.fr/~fpottier/
  3332.  
  3333. ---------------------------
  3334.  
  3335. From vferrera@ix.netcom.com
  3336. Subject: text rotation
  3337. Date: Fri, 20 Sep 1996 21:38:37 +0000
  3338. Organization: Netcom
  3339.  
  3340. Does anyone know an easy way to rotate text strings in Quickdraw?  I 
  3341. am plotting some scientific data and I want to rotate the y-axis 
  3342. labels so that the text runs vertically rather than horizontally.  It 
  3343. seems like there should be an easy way to do this, but I can't find 
  3344. any obvious functions in my copy of IM (which is many years out of 
  3345. date).  I am using Think C 5.0.4 and system 7.1, so you can see what a 
  3346. dinosaur I am.  Any help is appreciated.  Even more so if you can 
  3347. reply by email to: vpf3@columbia.edu.  Thanks,
  3348.  
  3349. Vincent Ferrera
  3350.  
  3351. +++++++++++++++++++++++++++
  3352.  
  3353. From SouthSide@kagi.com (Bob Bradley)
  3354. Date: Fri, 20 Sep 1996 19:09:32 -0800
  3355. Organization: SPC
  3356.  
  3357. In article <32430EDD.373C@ix.netcom.com>, vferrera@ix.netcom.com wrote:
  3358.  
  3359. > Does anyone know an easy way to rotate text strings in Quickdraw?  I 
  3360. > am plotting some scientific data and I want to rotate the y-axis 
  3361. > labels so that the text runs vertically rather than horizontally.  It 
  3362. > seems like there should be an easy way to do this, but I can't find 
  3363. > any obvious functions in my copy of IM (which is many years out of 
  3364. > date).  I am using Think C 5.0.4 and system 7.1, so you can see what a 
  3365. > dinosaur I am.  Any help is appreciated.  Even more so if you can 
  3366. > reply by email to: vpf3@columbia.edu.  Thanks,
  3367.  
  3368. If you can't rely on QuickDraw GX being installed and you don't mind being
  3369. forced to a fixed resolution (eg. 72 dpi) there's source on Apple's and
  3370. the alt.source.mac site for rotating a string into a Bitmap which you can
  3371. CopyBits to wherever you need it.
  3372.  
  3373. +++++++++++++++++++++++++++
  3374.  
  3375. From dowdy@apple.com (Tom Dowdy)
  3376. Date: Tue, 24 Sep 1996 08:21:58 -0700
  3377. Organization: Apple Computer, Inc.
  3378.  
  3379. In article <3247ADC2.4F93@sperling.com>, sperling@sperling.com wrote:
  3380. > Easy? Yes and no. It's very easy if your programming in FutureBasic,
  3381. > else it's not so easy. Unfortunately, Apple never built that sort of
  3382. > thing into a toolbox call. Too bad...
  3383.  
  3384. Actually, QuickDraw GX allows you to perform any 3X3 matrix operation on
  3385. any object (text included) so you can perform rotation with a toolbox
  3386. call.
  3387.  
  3388. It's pretty easy to use GX just for one chunk of your code and not others,
  3389. and to disable features of your app when it isn't there.
  3390.  
  3391. -- 
  3392.  Tom Dowdy                  Internet: dowdy@apple.COM
  3393.  Apple Computer MS:302-3KS  UUCP: {sun,voder,amdahl,decwrl}!apple!dowdy
  3394.  1 Infinite Loop            AppleLink: DOWDY1
  3395.  Cupertino, CA 95014       
  3396.  "The 'Ooh-Ah' Bird is so called because it lays square eggs."
  3397.  
  3398. +++++++++++++++++++++++++++
  3399.  
  3400. From carl.gustafson@no.spam.welcome (Carl Gustafson)
  3401. Date: Tue, 24 Sep 1996 12:29:42 -0400
  3402. Organization: Imaging and Computer Vision Center, Drexel University
  3403.  
  3404. In article <32430EDD.373C@ix.netcom.com>, vferrera@ix.netcom.com wrote:
  3405.  
  3406. > Does anyone know an easy way to rotate text strings in Quickdraw?  I 
  3407. > am plotting some scientific data and I want to rotate the y-axis 
  3408. > labels so that the text runs vertically rather than horizontally.  It 
  3409. > seems like there should be an easy way to do this, but I can't find 
  3410. > any obvious functions in my copy of IM (which is many years out of 
  3411. > date).  I am using Think C 5.0.4 and system 7.1, so you can see what a 
  3412. > dinosaur I am.  Any help is appreciated.  Even more so if you can 
  3413. > reply by email to: vpf3@columbia.edu.  Thanks,
  3414.  
  3415. You can not rotate text directly in QuickDraw (You can in GX). To do
  3416. rotated text in POQD (plain old QuickDraw) you need to draw the text into
  3417. a buffer, then rotate the buffer (you thus have two buffers - one long,
  3418. the other tall), and copybits that buffer into your drawing.
  3419.  
  3420. Easiest way is to make two 8-bit deep buffers (GWorlds) based on your text
  3421. dimensions, draw to one, they move pixel-by-pixel into the other.
  3422.  
  3423. -- 
  3424. Carl Gustafson
  3425. carl.gustafson at ece.drexel.edu
  3426. (busily trying to avoid spammers)
  3427. Imaging and Computer Vision Center
  3428. Drexel University, Philadelphia, Penna
  3429. - ----------------------------------------------------------
  3430. I don't speak for Drexel, and Drexel doesn't listen to me...
  3431.  
  3432. +++++++++++++++++++++++++++
  3433.  
  3434. From "Tedd F. Sperling" <sperling@sperling.com>
  3435. Date: Tue, 24 Sep 1996 09:45:46 +0000
  3436. Organization: Sperling Corporation
  3437.  
  3438. vferrera@ix.netcom.com wrote:
  3439. > Does anyone know an easy way to rotate text strings in Quickdraw?  I
  3440. > am plotting some scientific data and I want to rotate the y-axis
  3441. > labels so that the text runs vertically rather than horizontally.  It
  3442. > seems like there should be an easy way to do this, but I can't find
  3443. > any obvious functions in my copy of IM (which is many years out of
  3444. > date).  I am using Think C 5.0.4 and system 7.1, so you can see what a
  3445. > dinosaur I am.  Any help is appreciated.  Even more so if you can
  3446. > reply by email to: vpf3@columbia.edu.  Thanks,
  3447. > Vincent Ferrera
  3448.  
  3449. Hi:
  3450.  
  3451. Easy? Yes and no. It's very easy if your programming in FutureBasic,
  3452. else it's not so easy. Unfortunately, Apple never built that sort of
  3453. thing into a toolbox call. Too bad...
  3454.  
  3455. For angles of 90 and 180 (left-to-right -> up-to-down and left-to-right
  3456. -> down-to-up), FutureBasic PGPro has a function for doing that very
  3457. fast.
  3458.  
  3459. The way to do it is to draw the string in Offscreen GWorlds and then
  3460. rotate the rectangle 90 degrees and bring it back via copybits.
  3461.  
  3462. tedd
  3463.  
  3464. -- 
  3465.    ____
  3466.   |[  ]| mac programmer                             tedd f. sperling
  3467.   |[__]|                               mailto: sperling@sperling.com
  3468.   |___-|                http://www.sojourn.com/~sperling/resume.html
  3469. - -
  3470.  
  3471. +++++++++++++++++++++++++++
  3472.  
  3473. From "Tedd F. Sperling" <sperling@sperling.com>
  3474. Date: Wed, 25 Sep 1996 08:51:57 +0000
  3475. Organization: Sperling Corporation
  3476.  
  3477. Tom Dowdy wrote:
  3478. > In article <3247ADC2.4F93@sperling.com>, sperling@sperling.com wrote:
  3479. > > Easy? Yes and no. It's very easy if your programming in FutureBasic,
  3480. > > else it's not so easy. Unfortunately, Apple never built that sort of
  3481. > > thing into a toolbox call. Too bad...
  3482. > Actually, QuickDraw GX allows you to perform any 3X3 matrix operation on
  3483. > any object (text included) so you can perform rotation with a toolbox
  3484. > call.
  3485. > It's pretty easy to use GX just for one chunk of your code and not others,
  3486. > and to disable features of your app when it isn't there.
  3487. > --
  3488. >  Tom Dowdy                  Internet: dowdy@apple.COM
  3489. >  Apple Computer MS:302-3KS  UUCP: {sun,voder,amdahl,decwrl}!apple!dowdy
  3490. >  1 Infinite Loop            AppleLink: DOWDY1
  3491. >  Cupertino, CA 95014
  3492. >  "The 'Ooh-Ah' Bird is so called because it lays square eggs."
  3493.  
  3494.  
  3495. Tom:
  3496.  
  3497. OK, what is the toolbox call to rotate text?
  3498.  
  3499.  
  3500. tedd
  3501.  
  3502. -- 
  3503.    ____
  3504.   |[  ]| mac programmer                             tedd f. sperling
  3505.   |[__]|                               mailto: sperling@sperling.com
  3506.   |___-|                http://www.sojourn.com/~sperling/resume.html
  3507. - -
  3508.  
  3509. +++++++++++++++++++++++++++
  3510.  
  3511. From dkj@apple.com (Dave Johnson)
  3512. Date: Wed, 25 Sep 1996 09:57:28 -0700
  3513. Organization: Apple Computer, Inc.
  3514.  
  3515. <snip>
  3516. > Tom:
  3517. > OK, what is the toolbox call to rotate text?
  3518. > tedd
  3519.  
  3520. I'm not Tom, but to rotate any GX shape, you can call
  3521.  
  3522. GXRotateShape( target, degrees, xOffset, yOffset );
  3523.  
  3524. where:
  3525.  
  3526. target   A reference to the shape you want to rotate.
  3527. degrees  The number of degrees to rotate the shape.
  3528. xOffset  The horizontal coordinate of the origin to rotate the shape around.
  3529. yOffset  The vertical coordinate of the origin to rotate the shape around.
  3530.  
  3531. there are several other ways to do it, too, but that's beyond the scope of
  3532. this answer :-)
  3533.  
  3534. - -
  3535. BTW, in the non-GX realm, there was a very cool algorithm to rotate a
  3536. bitmap or pixmap by 90 degrees presented years ago in MacTutor Vol. 1, No.
  3537. 12 (and reprinted in "The Best of MacTutor, Vol. 1") by Robert B Denny. If
  3538. anyone's interested, I can post my own (pretty skanky) version of it. It's
  3539. much more elegant - and lots faster, I think - than a pixel-by-pixel
  3540. transformation.
  3541.  
  3542. Dave Johnson
  3543. dkj@aple.com
  3544.  
  3545. +++++++++++++++++++++++++++
  3546.  
  3547. From jasonp@red.seas.upenn.edu (Jason S Pareti)
  3548. Date: 25 Sep 1996 19:36:00 GMT
  3549. Organization: University of Pennsylvania
  3550.  
  3551. Dave Johnson (dkj@apple.com) wrote:
  3552.  
  3553. : If anyone's interested, I can post my own (pretty skanky) version of it.
  3554. : much more elegant - and lots faster, I think - than a pixel-by-pixel
  3555. : transformation.
  3556.  
  3557. Yeah, I'd be very interested in seeing it, if you don't mind.  Thanks.
  3558.  
  3559. Cheers,
  3560. Jason
  3561. (someone who's software uses the old pixel-by-pixel method)
  3562.  
  3563.  
  3564. +++++++++++++++++++++++++++
  3565.  
  3566. From "Tedd F. Sperling" <sperling@sperling.com>
  3567. Date: Wed, 25 Sep 1996 23:04:36 +0000
  3568. Organization: Sperling Corporation
  3569.  
  3570. Dave Johnson wrote:
  3571. > <snip>
  3572. > > Tom:
  3573. > >
  3574. > > OK, what is the toolbox call to rotate text?
  3575. > >
  3576. > >
  3577. > > tedd
  3578. > I'm not Tom, but to rotate any GX shape, you can call
  3579. > GXRotateShape( target, degrees, xOffset, yOffset );
  3580. > where:
  3581. > target   A reference to the shape you want to rotate.
  3582. > degrees  The number of degrees to rotate the shape.
  3583. > xOffset  The horizontal coordinate of the origin to rotate the shape around.
  3584. > yOffset  The vertical coordinate of the origin to rotate the shape around.
  3585. > there are several other ways to do it, too, but that's beyond the scope of
  3586. > this answer :-)
  3587. > ---
  3588. > BTW, in the non-GX realm, there was a very cool algorithm to rotate a
  3589. > bitmap or pixmap by 90 degrees presented years ago in MacTutor Vol. 1, No.
  3590. > 12 (and reprinted in "The Best of MacTutor, Vol. 1") by Robert B Denny. If
  3591. > anyone's interested, I can post my own (pretty skanky) version of it. It's
  3592. > much more elegant - and lots faster, I think - than a pixel-by-pixel
  3593. > transformation.
  3594. > Dave Johnson
  3595. > dkj@aple.com
  3596.  
  3597.  
  3598. Dave:
  3599.  
  3600. Thanks, I'll try GXRotateShape().
  3601.  
  3602.  
  3603. tedd
  3604.  
  3605.  
  3606. -- 
  3607.    ____
  3608.   |[  ]| mac programmer                             tedd f. sperling
  3609.   |[__]|                               mailto: sperling@sperling.com
  3610.   |___-|                http://www.sojourn.com/~sperling/resume.html
  3611. - -
  3612.  
  3613. +++++++++++++++++++++++++++
  3614.  
  3615. From rcsmith@servtech.com (Roger Smith)
  3616. Date: Tue, 24 Sep 1996 21:21:55 -0500
  3617. Organization: Base Online
  3618.  
  3619. In article <3247ADC2.4F93@sperling.com>, sperling@sperling.com wrote:
  3620.  
  3621. > vferrera@ix.netcom.com wrote:
  3622. > > 
  3623. > > Does anyone know an easy way to rotate text strings in Quickdraw?  I
  3624. > > am plotting some scientific data and I want to rotate the y-axis
  3625. > > labels so that the text runs vertically rather than horizontally.  It
  3626. > > seems like there should be an easy way to do this, but I can't find
  3627. > > any obvious functions in my copy of IM (which is many years out of
  3628. > > date).  I am using Think C 5.0.4 and system 7.1, so you can see what a
  3629. > > dinosaur I am.  Any help is appreciated.  Even more so if you can
  3630. > > reply by email to: vpf3@columbia.edu.  Thanks,
  3631. > > 
  3632. > > Vincent Ferrera
  3633.  
  3634. Here is one option which may be overkill in your situation, grab a hold of
  3635. the Develop article 'curves ahead' (Curves in quickdraw). Using only
  3636. Quickdraw calls and true type fonts (i.e 'sfnt' resource) it shows how to
  3637. extract the outline information from a true type font. I went one step
  3638. further and modified the sample code to return a polyhandle representing
  3639. the text, then using a simple "rotate polygon x degrees" routine I could
  3640. rotate and draw a polygon outline (or you could call filly poly) of the
  3641. text in any position withouthaving to use gworlds or GX. 
  3642.  
  3643. Roger Smith
  3644.  
  3645. +++++++++++++++++++++++++++
  3646.  
  3647. From dkj@apple.com (Dave Johnson)
  3648. Date: Fri, 27 Sep 1996 11:05:54 -0700
  3649. Organization: Apple Computer, Inc.
  3650.  
  3651. In article <52c1j0$gpq@netnews.upenn.edu>, jasonp@red.seas.upenn.edu
  3652. (Jason S Pareti) wrote:
  3653.  
  3654. > Dave Johnson (dkj@apple.com) wrote:
  3655. > : If anyone's interested, I can post my own (pretty skanky) version of it.
  3656. > : much more elegant - and lots faster, I think - than a pixel-by-pixel
  3657. > : transformation.
  3658. > Yeah, I'd be very interested in seeing it, if you don't mind.  Thanks.
  3659. > Cheers,
  3660. > Jason
  3661. > (someone who's software uses the old pixel-by-pixel method)
  3662.  
  3663. The original article is at:
  3664.  
  3665. http://web.xplain.com/mactech.com/Articles/Vol.01/01.12/PICT-Rotation/text.html
  3666.  
  3667. and includes some sample code in the article, but it was wrtitten in 1985
  3668. so I don't know if it will still work.
  3669.  
  3670. I confess I don't have the slightest idea how to post binaries, so posting
  3671. my code isn't possible at the moment. Now that I've exposed my ignorance,
  3672. anyone want to enlighten me? Email, please...
  3673.  
  3674. I'll see if I can get it on a publick ftp site, too.
  3675.  
  3676. Dave Johnson
  3677. dkj@apple.com
  3678.  
  3679. +++++++++++++++++++++++++++
  3680.  
  3681. From rogpatrick@aol.com (RogPatrick)
  3682. Date: 6 Oct 1996 17:46:15 -0400
  3683. Organization: America Online, Inc. (1-800-827-6364)
  3684.  
  3685. If you use Quickdraw GX to rotate text, does it preserve
  3686. its identity as text or will it appear bit-mapped when
  3687. printed or saved to a PICT file???
  3688. If the answer is no (or even if it's yes) does anyone know 
  3689. a method for getting around this? Seems like programs
  3690. such as Cricket Graph or MacDraw have been doing this 
  3691. for years?
  3692.  
  3693. +++++++++++++++++++++++++++
  3694.  
  3695. From "Tedd F. Sperling" <sperling@sperling.com>
  3696. Date: Sun, 06 Oct 1996 20:14:33 +0000
  3697. Organization: Sperling Corporation
  3698.  
  3699. RogPatrick wrote:
  3700. > If you use Quickdraw GX to rotate text, does it preserve
  3701. > its identity as text or will it appear bit-mapped when
  3702. > printed or saved to a PICT file???
  3703. > If the answer is no (or even if it's yes) does anyone know
  3704. > a method for getting around this? Seems like programs
  3705. > such as Cricket Graph or MacDraw have been doing this
  3706. > for years?
  3707.  
  3708.  
  3709. Well... I haven't used QuickDraw GX to rotate text, so I can't speak for
  3710. what it does or does not do. However, I have written a text rotation
  3711. routine that draws the text in offscreen GWorld; then rotates a rect
  3712. surrounding the text; and then brings it forward via copybits. I assume
  3713. that GXRotate does something similar.
  3714.  
  3715. As such, you don't get high quality laser text when dumping it to a
  3716. printer. I instead use an alternate routine for printing rotated text to
  3717. the printer using PicComment (i.e., send the printer postscript
  3718. commands). It works fine for postscript printers, but non-postscript is
  3719. still bit-mapped.
  3720.  
  3721. Hope this helps.
  3722.  
  3723. tedd
  3724.  
  3725. -- 
  3726.    ____
  3727.   |[  ]| mac programmer                             tedd f. sperling
  3728.   |[__]|                               mailto: sperling@sperling.com
  3729.   |___-|                http://www.sojourn.com/~sperling/resume.html
  3730. - -
  3731.  
  3732. +++++++++++++++++++++++++++
  3733.  
  3734. From SouthSide@kagi.com (Bob Bradley)
  3735. Date: Sun, 06 Oct 1996 23:05:49 -0800
  3736. Organization: SPC
  3737.  
  3738. In article <32581326.7E20@sperling.com>, sperling@sperling.com wrote:
  3739.  
  3740. > Well... I haven't used QuickDraw GX to rotate text, so I can't speak for
  3741. > what it does or does not do. However, I have written a text rotation
  3742. > routine that draws the text in offscreen GWorld; then rotates a rect
  3743. > surrounding the text; and then brings it forward via copybits. I assume
  3744. > that GXRotate does something similar.
  3745.  
  3746. No, QuickDraw GX rotates the actual text shape as opposed to the bitmap
  3747. representation of the text so it doesn't lose quality. It will print just
  3748. as good rotated.
  3749.  
  3750. +++++++++++++++++++++++++++
  3751.  
  3752. From "Tedd F. Sperling" <sperling@sperling.com>
  3753. Date: Mon, 07 Oct 1996 09:42:20 +0000
  3754. Organization: Sperling Corporation
  3755.  
  3756. Bob Bradley wrote:
  3757. > In article <32581326.7E20@sperling.com>, sperling@sperling.com wrote:
  3758. > > Well... I haven't used QuickDraw GX to rotate text, so I can't speak for
  3759. > > what it does or does not do. However, I have written a text rotation
  3760. > > routine that draws the text in offscreen GWorld; then rotates a rect
  3761. > > surrounding the text; and then brings it forward via copybits. I assume
  3762. > > that GXRotate does something similar.
  3763. > No, QuickDraw GX rotates the actual text shape as opposed to the bitmap
  3764. > representation of the text so it doesn't lose quality. It will print just
  3765. > as good rotated.
  3766.  
  3767.  
  3768. Wow!
  3769.  
  3770. I'm impressed.
  3771.  
  3772. tedd
  3773.  
  3774. -- 
  3775.    ____
  3776.   |[  ]| mac programmer                             tedd f. sperling
  3777.   |[__]|                               mailto: sperling@sperling.com
  3778.   |___-|                http://www.sojourn.com/~sperling/resume.html
  3779. - -
  3780.  
  3781. ---------------------------
  3782.  
  3783. End of C.S.M.P. Digest
  3784. **********************
  3785.  
  3786.